lib/para/form_builder/containers.rb in para-0.8.3.3 vs lib/para/form_builder/containers.rb in para-0.8.5

- old
+ new

@@ -25,10 +25,12 @@ end end end def actions_buttons_for(options) - names = [:submit, :submit_and_edit, :submit_and_add_another, :cancel] + names = [:submit, :submit_and_edit] + names << :submit_and_add_another if template.can?(:create, object.class) + names << :cancel names.select! { |name| Array.wrap(options[:only]).include?(name) } if options[:only] names.reject! { |name| Array.wrap(options[:except]).include?(name) } if options[:except] buttons = names.map { |name| send(:"para_#{ name }_button") } buttons.unshift(return_to_hidden_field)