Skip to content

Instantly share code, notes, and snippets.

@nomnel
Created April 9, 2013 06:17
Show Gist options
  • Save nomnel/5343358 to your computer and use it in GitHub Desktop.
Save nomnel/5343358 to your computer and use it in GitHub Desktop.
module ActionView
module Helpers
module FormTagHelper
alias_method :original_submit_tag, :submit_tag
def submit_tag(value=nil, options={})
options[:disable_with] = options[:disable_with] == '' ? nil : 'Sending...'
original_submit_tag value, options
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment