blob: 7801311e455345cc50ae1500d3c92d21e6fe188e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
%form{:method => 'post', :action => '/'}
-unless @grito.nil?
-unless @grito.errors.empty?
#errors
-@grito.errors.each do |e|
%span= e
%br
-else
#success
Su texto ha sido guardado!
%a{:href=>"/#{@grito.gethash}"} De click aquí para verlo.
%h1 Título
-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!'}
|