diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-06-23 17:37:44 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-06-23 17:37:44 +0000 |
commit | 8aefa3ee75e261488a39ea9d26a767c9db696c20 (patch) | |
tree | 8c63d96ee0bea9526eab71de71f26ea6d000e0c5 /actionpack/lib/action_view | |
parent | 376f1210757e53a0d77f5fce782c6c5ef9dc49d4 (diff) | |
download | rails-8aefa3ee75e261488a39ea9d26a767c9db696c20.tar.gz rails-8aefa3ee75e261488a39ea9d26a767c9db696c20.tar.bz2 rails-8aefa3ee75e261488a39ea9d26a767c9db696c20.zip |
Docfix (closes #8353)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7105 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/helpers/form_tag_helper.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/form_tag_helper.rb b/actionpack/lib/action_view/helpers/form_tag_helper.rb index 5b5dace5ee..cf8fb74f59 100644 --- a/actionpack/lib/action_view/helpers/form_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb @@ -128,8 +128,14 @@ module ActionView tag :input, html_options end - # Creates a submit button with the text <tt>value</tt> as the caption. If options contains a pair with the key of "disable_with", + # Creates a submit button with the text <tt>value</tt> as the caption. If options contains a pair with the key of <tt>:disable_with</tt>, # then the value will be used to rename a disabled version of the submit button. + # + # Options: + # * <tt>:disable_with</tt> - When specified the button will be disabled when clicked and the <tt>value</tt> will be replaced with the + # the string provided. + # # Outputs <input name="commit" onclick="this.disabled=true;this.value='Saving...';this.form.submit();" type="submit" value="Send" /> + # <%= submit_tag 'Send', :disable_with => 'Saving...' %> def submit_tag(value = "Save changes", options = {}) options.stringify_keys! |