public
anonymous / _form.html.erb
Created

_form.html.erb

  • Download Gist
_form.html.erb
HTML+ERB
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 28 29 30 31 32 33
<%= 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 %>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.