Sha256: bcbb52cf168fd7ef013eec51060e23413cea0312f0d63eb1bef0e89037f7ea2a
Contents?: true
Size: 1.39 KB
Versions: 10
Compression:
Stored size: 1.39 KB
Contents
<%%= form_for(<%= form_resource_path %>) 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 /> <%- case attribute.type when :references, :belongs_to -%> <%% if @<%= singular_table_name %>.new_record? -%> <%%= f.collection_select :<%= attribute.name %>_id, <%= attribute.name.classify %>.all, :id, :name, :prompt => true if can?(:manage, <%=class_name %>) %> <%% else -%> <%%= f.collection_select :<%= attribute.name %>_id, <%= attribute.name.classify %>.all, :id, :name, :prompt => true %> <%% end -%> <%- when :date -%> <%%= f.<%= attribute.field_type %> :<%= attribute.name %> <%=", :class => \"calendar\"" if jquery_ui?%> %> <%- else -%> <%%= f.<%= attribute.field_type %> :<%= attribute.name %> %> <%- end -%> </div> <%- end -%> <div class="actions"> <%%= f.submit :class => 'button large' %> </div> <%% end %>
Version data entries
10 entries across 10 versions & 1 rubygems