Skip to content

Instantly share code, notes, and snippets.

@edison
Created September 8, 2012 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edison/3679102 to your computer and use it in GitHub Desktop.
Save edison/3679102 to your computer and use it in GitHub Desktop.
form
<% 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 %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment