Added simple form for easier form building.

This commit is contained in:
benni 2011-05-14 17:06:32 +02:00
parent ca15bb1102
commit 03d84aed1d
9 changed files with 185 additions and 5 deletions

View file

@ -0,0 +1,13 @@
<%%= simple_form_for(@<%= singular_name %>) do |f| %>
<%%= f.error_notification %>
<div class="inputs">
<%- attributes.each do |attribute| -%>
<%%= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %> %>
<%- end -%>
</div>
<div class="actions">
<%%= f.button :submit %>
</div>
<%% end %>