Sha256: f2027df03998bb8f147b3ac5e9afab314914c5481dc902d003068d5d58957dd6
Contents?: true
Size: 1.35 KB
Versions: 15
Compression:
Stored size: 1.35 KB
Contents
<%% title "New <%= gen_spec.singular_title %>" %> <h1>New <%= gen_spec.singular_name %></h1> <%% form_for(@<%= gen_spec.singular_name %>, :html=>{:class=>"uniForm"}) do |f| %> <%%= f.error_messages %> <% if gen_spec.ascendant -%> <%%=f.hidden(<%=gen_spec.singular_name%>, <%=gen_spec.ascendant[:key].inspect%>) <% end %> <% for group in gen_spec.safe_form_groups -%> <fieldset class="inlineLabels"> <legend><%=group[:group_name]%></legend> <% for attribute in group[:attributes] -%> <%options=gen_spec.column_specs[attribute] -%> <div class="ctrlHolder"> <%%= f.label <%= options[:label].inspect %> %> <% case options[:type] -%> <% when :file -%> <%%= f.file_field :<%= attribute %> %> <% when :string -%> <%%= f.text_field :<%= attribute %> %> <% when :foreign_key -%> <%%= collection_select(:<%=gen_spec.singular_name%>, :<%= attribute %>, @<%=gen_spec.belongs_to_name(attribute).pluralize%>, :id, :short_name, options = {:prompt => "- Select a <%=gen_spec.belongs_to_name(attribute).titleize.downcase%>"}, html_options = {}) %> <% when :photo -%> <%%= f.file_field :<%= attribute %> %> <% when :datetime -%> <%%= f.text_field :<%= attribute %> %> <% end -%> </div> <% end -%> </fieldset> <% end -%> <div class="buttonHolder"> <%%= f.submit 'Create', :class=>"primaryAction"%> </div> <%% end %> <%%= link_to 'Back', <%= plural_name %>_path %>
Version data entries
15 entries across 15 versions & 1 rubygems