Created
December 3, 2012 15:48
-
-
Save hwatkins/4195872 to your computer and use it in GitHub Desktop.
Add form submit id back to rails
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ActionView | |
module Helpers | |
class FormBuilder | |
# code from rails 3.0 | |
def submit(value=nil, options={}) | |
value, options = nil, value if value.is_a?(Hash) | |
value ||= submit_default_value | |
@template.submit_tag(value, options.reverse_merge(:id => "#{object_name}_submit")) | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment