From b7be4f63119c71b07eacc9af9e6a15db63ef65ea Mon Sep 17 00:00:00 2001 From: Ben Beltran Date: Wed, 1 Dec 2010 13:10:52 -0700 Subject: Version 1.0 Como quien dice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ya todo estilizado, arregle unas cosas en cuanto a validación ... y aha. --- views/index.haml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'views/index.haml') diff --git a/views/index.haml b/views/index.haml index 2b40431..7801311 100644 --- a/views/index.haml +++ b/views/index.haml @@ -10,9 +10,18 @@ Su texto ha sido guardado! %a{:href=>"/#{@grito.gethash}"} De click aquí para verlo. %h1 Título - %input.title{:type => 'text', :name => 'title'} + -unless @grito.nil? + -unless @grito.errors.empty? + %input.title{:type => 'text', :name => 'title', :Value => @grito.title} + -else + %input.title{:type => 'text', :name => 'title'} + -else + %input.title{:type => 'text', :name => 'title'} %br %h1 Texto %textarea.text{:name => 'text', :cols => '76', :rows => '20'} + -unless @grito.nil? + -unless @grito.errors.empty? + =@grito.text %br %input.submit{:type => 'submit', :value => 'Gritalo!'} \ No newline at end of file -- cgit