dryml_generators/rapid/pages.dryml.erb in hobo-0.8.1 vs dryml_generators/rapid/pages.dryml.erb in hobo-0.8.2

- old
+ new

@@ -55,11 +55,13 @@ <section param="content-header"> <h2 param="heading">New <%= model_name :title %></h2> </section> <section param="content-body"> - <form param/> + <form param> + <submit: label="Create <%= model_name :title %>"/> + </form> </section> </content:> </page> </def> @@ -75,11 +77,11 @@ collection = model.dependent_collections.sort_by(&:to_s).first if collection collection_class = model.reflections[collection].klass owner = model.reverse_reflection(collection)._?.name if owner - add_link = collection &&linkable?(collection_class, :"new_for_#{owner}") + add_link = collection && linkable?(collection_class, :"new_for_#{owner}") add_form = !add_link && linkable?(collection_class, :"create_for_#{owner}", :method => :post) end end -%> <def tag="show-page" for="<%= model.name %>"> @@ -172,11 +174,11 @@ <% controller.owner_actions.each_pair do |owner, actions| -%> <% collection_name = model.reverse_reflection(owner).name.to_s owner_model = model.reflections[owner].klass -owner_tag = linkable?(owner_model) ? "a" : "name" +owner_tag = linkable?(owner_model, :show) ? "a" : "name" owner = owner.to_s -%> <% if :index.in? actions -%> <% new_link = :new.in?(actions) @@ -226,9 +228,10 @@ </header> <section param="content-body"> <form owner="<%= owner %>" method="post" param> <field-list: skip="<%= owner %>"/> + <submit: label="Create <%= model_name :title %>"/> </form> </section> </content:> </page> </def>