Sha256: 3b67f408c3ea59143d1929a91919051c62e11c87ed89fcf92fcf434bc61c84c3
Contents?: true
Size: 804 Bytes
Versions: 2
Compression:
Stored size: 804 Bytes
Contents
<%%= form_for(@<%= singular_table_name %>) do |f| %> <%% if @<%= singular_table_name %>.errors.any? %> <div id="error_explanation"> <h2><%%= pluralize(@<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:</h2> <ul> <%% @<%= singular_table_name %>.errors.full_messages.each do |msg| %> <li><%%= msg %></li> <%% end %> </ul> </div> <%% end %> <% attributes.each do |attribute| -%> <div class="field"> <%%= f.label :<%= attribute.name %>, t('attributes.<%= singular_table_name %>.<%= attribute.name %>') %><br /> <%%= f.<%= attribute.field_type %> :<%= attribute.name %> %> </div> <% end -%> <div class="actions"> <%%= f.submit :class => 'button large' %> </div> <%% end %>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
leonardo-1.5.0 | lib/generators/erb/leosca/templates/_form.html.erb |
leonardo-1.4.0 | lib/generators/erb/leosca/templates/_form.html.erb |