Skip to content

Instantly share code, notes, and snippets.

@hwatkins
Created December 3, 2012 15:48
Show Gist options
  • Save hwatkins/4195872 to your computer and use it in GitHub Desktop.
Save hwatkins/4195872 to your computer and use it in GitHub Desktop.
Add form submit id back to rails
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