Sha256: dd15a666bfcfcbfc2547bf83dbd9ec5eb25e87d17bf915eda4601cdaa8bd2577
Contents?: true
Size: 1006 Bytes
Versions: 3
Compression:
Stored size: 1006 Bytes
Contents
= render :partial => 'form', :layout => 'shared/admin/module_layout' <%- level.nested_levels.each do |child| -%> <%- if child.join? -%> <%- parent_name = level.subclass? ? level.superclass.name : level.name -%> <%- other_parent_name = child.other_parent_name(parent_name) -%> .module .tabletop .description %h3 <%= other_parent_name.titleize %> .add - @unassociated_<%= other_parent_name.pluralize %> = [Object] - if @unassociated_<%= other_parent_name.pluralize %>.length > 0 - form_for [:admin, <%= child.name.camelize %>.new], :html => { :class => 'link_form' } do |f| %p = f.hidden_field :<%= parent_name %>_id, :value => resource.id = f.select(:<%= other_parent_name %>_id, @unassociated_<%= other_parent_name.pluralize %>.collect { |c| [c.name, c.id] }, { :prompt => 'Link <%= other_parent_name.gsub('_', ' ') %>' }, {:onchange => "submit()"}) <%- else -%> = render_collection :<%= child.name.pluralize %> <%- end -%> <%- end -%>
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
schofield-0.2.2 | lib/generators/templates/show.erb |
schofield-0.2.1 | lib/generators/templates/show.erb |
schofield-0.2.0 | lib/generators/templates/show.erb |