{"action":"created","comment":{"url":"https://api.github.com/repos/rails/rails/pulls/comments/36776943","id":36776943,"diff_hunk":"@@ -412,36 +412,51 @@ def radio_button_tag(name, value, checked = false, options = {})\n       # * <tt>confirm: 'question?'</tt> - If present the unobtrusive JavaScript\n       #   drivers will provide a prompt with the question specified. If the user accepts,\n       #   the form is processed normally, otherwise no action is taken.\n-      # * <tt>:disable_with</tt> - Value of this parameter will be used as the value for a\n+      # * <tt>:disable_with</tt> - Defaults to value attribute. Value of this parameter will be used as the value for a\n       #   disabled version of the submit button when the form is submitted. This feature is\n-      #   provided by the unobtrusive JavaScript driver.\n+      #   provided by the unobtrusive JavaScript driver. To disable this feature for a single submit tag\n+      #   pass <tt>:data => { :disable_with => false }</tt>\n       #\n       # ==== Examples\n       #   submit_tag\n-      #   # => <input name=\"commit\" type=\"submit\" value=\"Save changes\" />\n+      #   # => <input name=\"commit\" data-disable-with=\"Save changes\" type=\"submit\" value=\"Save changes\" />\n       #\n       #   submit_tag \"Edit this article\"\n-      #   # => <input name=\"commit\" type=\"submit\" value=\"Edit this article\" />\n+      #   # => <input name=\"commit\" data-disable-with=\"Edit this article\" type=\"submit\" value=\"Edit this article\" />\n       #\n       #   submit_tag \"Save edits\", disabled: true\n-      #   # => <input disabled=\"disabled\" name=\"commit\" type=\"submit\" value=\"Save edits\" />\n+      #   # => <input disabled=\"disabled\" name=\"commit\" data-disable-with=\"Save edits\" type=\"submit\" value=\"Save edits\" />\n       #\n-      #   submit_tag \"Complete sale\", data: { disable_with: \"Please wait...\" }\n-      #   # => <input name=\"commit\" data-disable-with=\"Please wait...\" type=\"submit\" value=\"Complete sale\" />\n+      #   submit_tag \"Complete sale\", data: { disable_with: \"Submitting...\" }\n+      #   # => <input name=\"commit\" data-disable-with=\"Submitting...\" type=\"submit\" value=\"Complete sale\" />\n       #\n       #   submit_tag nil, class: \"form_submit\"\n       #   # => <input class=\"form_submit\" name=\"commit\" type=\"submit\" />\n       #\n       #   submit_tag \"Edit\", class: \"edit_button\"\n-      #   # => <input class=\"edit_button\" name=\"commit\" type=\"submit\" value=\"Edit\" />\n+      #   # => <input class=\"edit_button\" data-disable-with=\"Edit\" name=\"commit\" type=\"submit\" value=\"Edit\" />\n       #\n       #   submit_tag \"Save\", data: { confirm: \"Are you sure?\" }\n-      #   # => <input name='commit' type='submit' value='Save' data-confirm=\"Are you sure?\" />\n+      #   # => <input name='commit' type='submit' value='Save' data-disable-with=\"Save\" data-confirm=\"Are you sure?\" />\n       #\n       def submit_tag(value = \"Save changes\", options = {})\n         options = options.stringify_keys\n+        tag_options = { \"type\" => \"submit\", \"name\" => \"commit\", \"value\" => value }.update(options)\n \n-        tag :input, { \"type\" => \"submit\", \"name\" => \"commit\", \"value\" => value }.update(options)\n+        if ActionView::Base.automatically_disable_submit_tag\n+          disable_with_text = value.clone\n+          disable_with_text = tag_options[\"data\"][:disable_with] if tag_options[\"data\"] && tag_options[\"data\"].has_key?(:disable_with)\n+          disable_with_text = tag_options[\"data-disable-with\"] if tag_options.has_key?(\"data-disable-with\")\n+\n+          if disable_with_text\n+            tag_options.deep_merge!({ \"data\" => { \"disable_with\" => disable_with_text } })","path":"actionview/lib/action_view/helpers/form_tag_helper.rb","position":51,"original_position":51,"commit_id":"e4d620f0a2a57e96d29b8af2e78dfa395bab7cdb","original_commit_id":"e4d620f0a2a57e96d29b8af2e78dfa395bab7cdb","user":{"login":"kaspth","id":350807,"avatar_url":"https://avatars.githubusercontent.com/u/350807?v=3","gravatar_id":"","url":"https://api.github.com/users/kaspth","html_url":"https://github.com/kaspth","followers_url":"https://api.github.com/users/kaspth/followers","following_url":"https://api.github.com/users/kaspth/following{/other_user}","gists_url":"https://api.github.com/users/kaspth/gists{/gist_id}","starred_url":"https://api.github.com/users/kaspth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaspth/subscriptions","organizations_url":"https://api.github.com/users/kaspth/orgs","repos_url":"https://api.github.com/users/kaspth/repos","events_url":"https://api.github.com/users/kaspth/events{/privacy}","received_events_url":"https://api.github.com/users/kaspth/received_events","type":"User","site_admin":false},"body":"Remove the braces around the `data` hash.","created_at":"2015-08-11T18:01:45Z","updated_at":"2015-08-11T18:01:45Z","html_url":"https://github.com/rails/rails/pull/21135#discussion_r36776943","pull_request_url":"https://api.github.com/repos/rails/rails/pulls/21135","_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/comments/36776943"},"html":{"href":"https://github.com/rails/rails/pull/21135#discussion_r36776943"},"pull_request":{"href":"https://api.github.com/repos/rails/rails/pulls/21135"}}},"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/21135","id":41699685,"html_url":"https://github.com/rails/rails/pull/21135","diff_url":"https://github.com/rails/rails/pull/21135.diff","patch_url":"https://github.com/rails/rails/pull/21135.patch","issue_url":"https://api.github.com/repos/rails/rails/issues/21135","number":21135,"state":"open","locked":false,"title":"make disable_with default in submit_tag","user":{"login":"DropsOfSerenity","id":2287977,"avatar_url":"https://avatars.githubusercontent.com/u/2287977?v=3","gravatar_id":"","url":"https://api.github.com/users/DropsOfSerenity","html_url":"https://github.com/DropsOfSerenity","followers_url":"https://api.github.com/users/DropsOfSerenity/followers","following_url":"https://api.github.com/users/DropsOfSerenity/following{/other_user}","gists_url":"https://api.github.com/users/DropsOfSerenity/gists{/gist_id}","starred_url":"https://api.github.com/users/DropsOfSerenity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DropsOfSerenity/subscriptions","organizations_url":"https://api.github.com/users/DropsOfSerenity/orgs","repos_url":"https://api.github.com/users/DropsOfSerenity/repos","events_url":"https://api.github.com/users/DropsOfSerenity/events{/privacy}","received_events_url":"https://api.github.com/users/DropsOfSerenity/received_events","type":"User","site_admin":false},"body":"I heard on the \"Bike Shed\" podcast that the idea of possibly making disable_with a default for submit_tag to prevent double submission by default, thought I would draft up a pull request for it and take a stab at it.","created_at":"2015-08-05T16:41:05Z","updated_at":"2015-08-11T18:01:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6554b58bdbc4fae13bf8c0c13811c8d93b85d368","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rails/rails/pulls/21135/commits","review_comments_url":"https://api.github.com/repos/rails/rails/pulls/21135/comments","review_comment_url":"https://api.github.com/repos/rails/rails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rails/rails/issues/21135/comments","statuses_url":"https://api.github.com/repos/rails/rails/statuses/e4d620f0a2a57e96d29b8af2e78dfa395bab7cdb","head":{"label":"DropsOfSerenity:master","ref":"master","sha":"e4d620f0a2a57e96d29b8af2e78dfa395bab7cdb","user":{"login":"DropsOfSerenity","id":2287977,"avatar_url":"https://avatars.githubusercontent.com/u/2287977?v=3","gravatar_id":"","url":"https://api.github.com/users/DropsOfSerenity","html_url":"https://github.com/DropsOfSerenity","followers_url":"https://api.github.com/users/DropsOfSerenity/followers","following_url":"https://api.github.com/users/DropsOfSerenity/following{/other_user}","gists_url":"https://api.github.com/users/DropsOfSerenity/gists{/gist_id}","starred_url":"https://api.github.com/users/DropsOfSerenity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DropsOfSerenity/subscriptions","organizations_url":"https://api.github.com/users/DropsOfSerenity/orgs","repos_url":"https://api.github.com/users/DropsOfSerenity/repos","events_url":"https://api.github.com/users/DropsOfSerenity/events{/privacy}","received_events_url":"https://api.github.com/users/DropsOfSerenity/received_events","type":"User","site_admin":false},"repo":{"id":30032751,"name":"rails","full_name":"DropsOfSerenity/rails","owner":{"login":"DropsOfSerenity","id":2287977,"avatar_url":"https://avatars.githubusercontent.com/u/2287977?v=3","gravatar_id":"","url":"https://api.github.com/users/DropsOfSerenity","html_url":"https://github.com/DropsOfSerenity","followers_url":"https://api.github.com/users/DropsOfSerenity/followers","following_url":"https://api.github.com/users/DropsOfSerenity/following{/other_user}","gists_url":"https://api.github.com/users/DropsOfSerenity/gists{/gist_id}","starred_url":"https://api.github.com/users/DropsOfSerenity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DropsOfSerenity/subscriptions","organizations_url":"https://api.github.com/users/DropsOfSerenity/orgs","repos_url":"https://api.github.com/users/DropsOfSerenity/repos","events_url":"https://api.github.com/users/DropsOfSerenity/events{/privacy}","received_events_url":"https://api.github.com/users/DropsOfSerenity/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DropsOfSerenity/rails","description":"Ruby on Rails","fork":true,"url":"https://api.github.com/repos/DropsOfSerenity/rails","forks_url":"https://api.github.com/repos/DropsOfSerenity/rails/forks","keys_url":"https://api.github.com/repos/DropsOfSerenity/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DropsOfSerenity/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DropsOfSerenity/rails/teams","hooks_url":"https://api.github.com/repos/DropsOfSerenity/rails/hooks","issue_events_url":"https://api.github.com/repos/DropsOfSerenity/rails/issues/events{/number}","events_url":"https://api.github.com/repos/DropsOfSerenity/rails/events","assignees_url":"https://api.github.com/repos/DropsOfSerenity/rails/assignees{/user}","branches_url":"https://api.github.com/repos/DropsOfSerenity/rails/branches{/branch}","tags_url":"https://api.github.com/repos/DropsOfSerenity/rails/tags","blobs_url":"https://api.github.com/repos/DropsOfSerenity/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DropsOfSerenity/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DropsOfSerenity/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/DropsOfSerenity/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DropsOfSerenity/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/DropsOfSerenity/rails/languages","stargazers_url":"https://api.github.com/repos/DropsOfSerenity/rails/stargazers","contributors_url":"https://api.github.com/repos/DropsOfSerenity/rails/contributors","subscribers_url":"https://api.github.com/repos/DropsOfSerenity/rails/subscribers","subscription_url":"https://api.github.com/repos/DropsOfSerenity/rails/subscription","commits_url":"https://api.github.com/repos/DropsOfSerenity/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/DropsOfSerenity/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/DropsOfSerenity/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/DropsOfSerenity/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/DropsOfSerenity/rails/contents/{+path}","compare_url":"https://api.github.com/repos/DropsOfSerenity/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DropsOfSerenity/rails/merges","archive_url":"https://api.github.com/repos/DropsOfSerenity/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DropsOfSerenity/rails/downloads","issues_url":"https://api.github.com/repos/DropsOfSerenity/rails/issues{/number}","pulls_url":"https://api.github.com/repos/DropsOfSerenity/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/DropsOfSerenity/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/DropsOfSerenity/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DropsOfSerenity/rails/labels{/name}","releases_url":"https://api.github.com/repos/DropsOfSerenity/rails/releases{/id}","created_at":"2015-01-29T17:42:44Z","updated_at":"2015-05-05T23:30:31Z","pushed_at":"2015-08-08T04:18:44Z","git_url":"git://github.com/DropsOfSerenity/rails.git","ssh_url":"git@github.com:DropsOfSerenity/rails.git","clone_url":"https://github.com/DropsOfSerenity/rails.git","svn_url":"https://github.com/DropsOfSerenity/rails","homepage":"http://rubyonrails.org","size":143326,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rails:master","ref":"master","sha":"64b5c849a071e7cd2c244258f2fb43850df53cb7","user":{"login":"rails","id":4223,"avatar_url":"https://avatars.githubusercontent.com/u/4223?v=3","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"repo":{"id":8514,"name":"rails","full_name":"rails/rails","owner":{"login":"rails","id":4223,"avatar_url":"https://avatars.githubusercontent.com/u/4223?v=3","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rails/rails","description":"Ruby on Rails","fork":false,"url":"https://api.github.com/repos/rails/rails","forks_url":"https://api.github.com/repos/rails/rails/forks","keys_url":"https://api.github.com/repos/rails/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rails/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rails/rails/teams","hooks_url":"https://api.github.com/repos/rails/rails/hooks","issue_events_url":"https://api.github.com/repos/rails/rails/issues/events{/number}","events_url":"https://api.github.com/repos/rails/rails/events","assignees_url":"https://api.github.com/repos/rails/rails/assignees{/user}","branches_url":"https://api.github.com/repos/rails/rails/branches{/branch}","tags_url":"https://api.github.com/repos/rails/rails/tags","blobs_url":"https://api.github.com/repos/rails/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rails/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rails/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/rails/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rails/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/rails/rails/languages","stargazers_url":"https://api.github.com/repos/rails/rails/stargazers","contributors_url":"https://api.github.com/repos/rails/rails/contributors","subscribers_url":"https://api.github.com/repos/rails/rails/subscribers","subscription_url":"https://api.github.com/repos/rails/rails/subscription","commits_url":"https://api.github.com/repos/rails/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/rails/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/rails/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/rails/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/rails/rails/contents/{+path}","compare_url":"https://api.github.com/repos/rails/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rails/rails/merges","archive_url":"https://api.github.com/repos/rails/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rails/rails/downloads","issues_url":"https://api.github.com/repos/rails/rails/issues{/number}","pulls_url":"https://api.github.com/repos/rails/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/rails/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/rails/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rails/rails/labels{/name}","releases_url":"https://api.github.com/repos/rails/rails/releases{/id}","created_at":"2008-04-11T02:19:47Z","updated_at":"2015-08-11T17:55:57Z","pushed_at":"2015-08-11T17:50:22Z","git_url":"git://github.com/rails/rails.git","ssh_url":"git@github.com:rails/rails.git","clone_url":"https://github.com/rails/rails.git","svn_url":"https://github.com/rails/rails","homepage":"http://rubyonrails.org","size":436125,"stargazers_count":27242,"watchers_count":27242,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":10930,"mirror_url":null,"open_issues_count":891,"forks":10930,"open_issues":891,"watchers":27242,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/21135"},"html":{"href":"https://github.com/rails/rails/pull/21135"},"issue":{"href":"https://api.github.com/repos/rails/rails/issues/21135"},"comments":{"href":"https://api.github.com/repos/rails/rails/issues/21135/comments"},"review_comments":{"href":"https://api.github.com/repos/rails/rails/pulls/21135/comments"},"review_comment":{"href":"https://api.github.com/repos/rails/rails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rails/rails/pulls/21135/commits"},"statuses":{"href":"https://api.github.com/repos/rails/rails/statuses/e4d620f0a2a57e96d29b8af2e78dfa395bab7cdb"}}}}