lib/express_templates/components/forms/submit.rb in express_templates-0.9.1 vs lib/express_templates/components/forms/submit.rb in express_templates-0.9.3

- old
+ new

@@ -9,18 +9,17 @@ contains -> { submit_tag(value, input_attributes) } - before_build -> { - # if we are not part of a form, we don't get a default id - begin - super() - rescue - add_class(config[:wrapper_class]) - remove_class('submit') - end + before_build(exclusive: true) { + add_class(config[:wrapper_class]) + remove_class('submit') } + + def resource_name + parent_form ? super : nil + end def value config[:value] end