app/helpers/bootstrap/form_helper.rb in bootstrap-view-helpers-0.0.13 vs app/helpers/bootstrap/form_helper.rb in bootstrap-view-helpers-0.0.14
- old
+ new
@@ -85,10 +85,15 @@
else
['btn', 'btn-primary']
end
options = ensure_class(options, button_classes)
- options[:disable_with] = "Processing ..." unless options.has_key?(:disable_with)
+ disable_or_remove = options[:data] && options[:data].delete(:disable_with)
+
+ unless disable_or_remove === false
+ options[:data] ||= {}
+ options[:data][:disable_with] = disable_or_remove || "Processing ..."
+ end
submit_tag(value, options)
end
end
\ No newline at end of file