diff options
Diffstat (limited to 'views/index.haml')
| -rw-r--r-- | views/index.haml | 11 |
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 |