X-Git-Url: https://git.r.bdr.sh/rbdr/grita/blobdiff_plain/0e0a67f4f172e61592d259386aa52f0635249f64..b316fed18eb47c27fcdbf8e2da4b248a6e00ce37:/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