Sha256: 633edcddd18ad72b34dde1aa7f0f304ec66e6a279362c6789c73e7e3f4923b87

Contents?: true

Size: 710 Bytes

Versions: 49

Compression:

Stored size: 710 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 %>

<% for attribute in attributes -%>
  <div class="field">
    <%%= f.label :<%= attribute.name %> %><br />
    <%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
  </div>
<% end -%>
  <div class="actions">
    <%%= f.submit %>
  </div>
<%% end %>

Version data entries

49 entries across 49 versions & 3 rubygems

Version Path
mizugumo-0.2.1 lib/generators/rails/mizugumo/templates/_form.html.erb
mizugumo-0.1.5 lib/generators/rails/mizugumo/templates/_form.html.erb
railties-3.0.20 lib/rails/generators/erb/scaffold/templates/_form.html.erb
railties-3.0.19 lib/rails/generators/erb/scaffold/templates/_form.html.erb
railties-3.0.18 lib/rails/generators/erb/scaffold/templates/_form.html.erb
railties-3.0.17 lib/rails/generators/erb/scaffold/templates/_form.html.erb
railties-3.0.16 lib/rails/generators/erb/scaffold/templates/_form.html.erb
railties-3.0.15 lib/rails/generators/erb/scaffold/templates/_form.html.erb
railties-3.0.14 lib/rails/generators/erb/scaffold/templates/_form.html.erb
railties-3.0.13 lib/rails/generators/erb/scaffold/templates/_form.html.erb
railties-3.0.13.rc1 lib/rails/generators/erb/scaffold/templates/_form.html.erb
railties-3.0.12 lib/rails/generators/erb/scaffold/templates/_form.html.erb
railties-3.0.12.rc1 lib/rails/generators/erb/scaffold/templates/_form.html.erb
railties-3.0.11 lib/rails/generators/erb/scaffold/templates/_form.html.erb
mizugumo-0.2.0 lib/generators/rails/mizugumo/templates/_form.html.erb
railties-3.0.10 lib/rails/generators/erb/scaffold/templates/_form.html.erb
railties-3.0.10.rc1 lib/rails/generators/erb/scaffold/templates/_form.html.erb
railties-3.0.9 lib/rails/generators/erb/scaffold/templates/_form.html.erb
railties-3.0.9.rc5 lib/rails/generators/erb/scaffold/templates/_form.html.erb
railties-3.0.9.rc4 lib/rails/generators/erb/scaffold/templates/_form.html.erb