public
Created

form

  • Download Gist
form.erb
HTML+ERB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
<% if @quote.errors.any? %>
<div class="alert alert-error">
<% @quote.errors.full_messages.each do |msg| %>
<p><%= msg %></p>
<% end %>
</div>
<% end %>
 
<%= form_for @quote do |f| %>
<%= f.label :content %>
<%= f.text_area :content, rows: 4, class: 'input-xxlarge' %>
<%= f.label :author %>
<%= f.text_field :author, class: 'input-xxlarge' %>
 
<p>
<%= f.submit 'Criar frase', class: 'btn btn-large btn-primary' %>
<%= link_to 'Cancelar', root_path, class: 'btn' %>
</p>
<% end %>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.