Sha256: 71f3aac4abe09e9edfc043ee83ce751cbf1be391a536791e4ccc2cb4b9b90693
Contents?: true
Size: 1.14 KB
Versions: 8
Compression:
Stored size: 1.14 KB
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"> <% if attribute.password_digest? -%> <%%= f.label :password %><br> <%%= f.password_field :password %> </div> <div class="field"> <%%= f.label :password_confirmation %><br> <%%= f.password_field :password_confirmation %> <% else -%> <%- if attribute.reference? -%> <%%= f.label :<%= attribute.column_name %> %><br> <%%= f.<%= attribute.field_type %> :<%= attribute.column_name %> %> <%- else -%> <%%= f.label :<%= attribute.name %> %><br> <%%= f.<%= attribute.field_type %> :<%= attribute.name %> %> <%- end -%> <% end -%> </div> <% end -%> <div class="actions"> <%%= f.submit %> </div> <%% end %>
Version data entries
8 entries across 8 versions & 1 rubygems