Sha256: a958375807e01710ac1e9eb6db3d5bf7d985d2005a83c7ec51d539a06e347b86

Contents?: true

Size: 1.16 KB

Versions: 15

Compression:

Stored size: 1.16 KB

Contents

<%# Original version taken from railties-4.2.5.1/lib/rails/generators/erb/scaffold/templates %>
<%%= bootstrap_form_for(@<%= singular_table_name %>, horizontal: true) 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 |message| %>
        <li><%%= message %></li>
      <%% end %>
      </ul>
    </div>
  <%% end %>

<% attributes.each do |attribute| -%>
<% if attribute.password_digest? -%>
  <%%= f.control_group :password, 'Password' do %>
    <%%= f.password_field :password %>
  <%% end %>
  <%%= f.control_group :password_confirmation, 'Password confirmation' do %>
    <%%= f.password_field :password_confirmation %>
  <%% end %>
<% else -%>
  <%%= f.control_group :<%= attribute.column_name %>, '<%= attribute.column_name.humanize %>' do %>
    <%%= f.<%= attribute.field_type %> :<%= attribute.column_name %> %>
  <%% end %>
<% end -%>
<% end -%>
  <div class="actions">
    <%%= f.submit %>
  </div>
<%% end %>

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
ndr_ui-4.1.1 lib/templates/erb/scaffold/_form.html.erb
ndr_ui-3.3.1 lib/templates/erb/scaffold/_form.html.erb
ndr_ui-3.3.0 lib/templates/erb/scaffold/_form.html.erb
ndr_ui-3.2.0 lib/templates/erb/scaffold/_form.html.erb
ndr_ui-3.1.0 lib/templates/erb/scaffold/_form.html.erb
ndr_ui-3.0.0 lib/templates/erb/scaffold/_form.html.erb
ndr_ui-2.3.0 lib/templates/erb/scaffold/_form.html.erb
ndr_ui-2.2.0 lib/templates/erb/scaffold/_form.html.erb
ndr_ui-2.1.1 lib/templates/erb/scaffold/_form.html.erb
ndr_ui-2.1.0 lib/templates/erb/scaffold/_form.html.erb
ndr_ui-2.0.2 lib/templates/erb/scaffold/_form.html.erb
ndr_ui-1.12.2 lib/templates/erb/scaffold/_form.html.erb
ndr_ui-1.12.1 lib/templates/erb/scaffold/_form.html.erb
ndr_ui-1.12.0 lib/templates/erb/scaffold/_form.html.erb
ndr_ui-1.8.1 lib/templates/erb/scaffold/_form.html.erb