summaryrefslogtreecommitdiff
path: root/views/index.haml
diff options
context:
space:
mode:
authorBen Beltran <ben@nsovocal.com>2010-12-01 13:10:52 -0700
committerBen Beltran <ben@nsovocal.com>2010-12-01 13:10:52 -0700
commitb7be4f63119c71b07eacc9af9e6a15db63ef65ea (patch)
treee1461fc67b472eb883c39ae08d49fcd7e88d156f /views/index.haml
parent8b832fa6c392ca95a645b01a74e61530b6d87ff3 (diff)
Version 1.0 Como quien dice
Ya todo estilizado, arregle unas cosas en cuanto a validación ... y aha.
Diffstat (limited to 'views/index.haml')
-rw-r--r--views/index.haml11
1 files changed, 10 insertions, 1 deletions
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