Skip to content

Instantly share code, notes, and snippets.

Created April 6, 2013 22:32
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 anonymous/5327923 to your computer and use it in GitHub Desktop.
Save anonymous/5327923 to your computer and use it in GitHub Desktop.
_form.html.erb
<%= form_for(@article) do |f| %>
<% if @article.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@article.errors.count, "error") %> prohibited this article from being saved:</h2>
<ul>
<% @article.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= f.label :code %><br />
<%= f.text_field :code %>
</div>
<div class="field">
<%= f.label :designation %><br />
<%= f.text_field :designation %>
</div>
<div class="field">
<%= f.label :depot %><br />
<%= f.text_field :depot %>
</div>
<div class="field">
<%= f.label :famille %><br />
<%= f.text_field :famille %>
</div>
<div class="actions">
<%= f.submit %>
</div>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment