Sha256: 5542e32b01fe8f093d8db32875004d9b70fb6bd90b081b2937682a4e08027afe
Contents?: true
Size: 933 Bytes
Versions: 11
Compression:
Stored size: 933 Bytes
Contents
= form_for @<%= singular_table_name %>, :html => { :class => "form-horizontal" } do |f| -if @<%= singular_table_name %>.errors.any? .alert.alert-danger.alert-dismissable %button.close{"aria-hidden" => "true", "data-dismiss" => "alert", :type => "button"} × %h4= "#{pluralize(@<%= singular_table_name %>.errors.count, "error")} prohibited this <%= singular_table_name %> from being saved:" %ul - @<%= singular_table_name %>.errors.full_messages.each do |msg| %li= msg <% for attribute in attributes -%> .form-group{ :class => error_for( @<%= singular_table_name %>, :<%= attribute.name %>, "has-error" ) } = f.label :<%= attribute.name %>, :class => 'col-sm-2 control-label' .col-sm-10 = f.<%= attribute.field_type %> :<%= attribute.name %>, :class => 'form-control' <% end -%> .form-group .col-sm-offset-2.col-sm-10 = f.submit :class => 'btn btn-primary'
Version data entries
11 entries across 11 versions & 1 rubygems