{"action":"created","comment":{"url":"https://api.github.com/repos/rails/rails/pulls/comments/185391165","pull_request_review_id":116768339,"id":185391165,"diff_hunk":"@@ -800,7 +806,7 @@ def permitted=(new_permitted)\n       end\n \n       def fields_for_style?\n-        @parameters.all? { |k, v| k =~ /\\A-?\\d+\\z/ && (v.is_a?(Hash) || v.is_a?(Parameters)) }\n+        @parameters.any? { |k, v| Parameters.field_style_valid?(k, v) }","path":"actionpack/lib/action_controller/metal/strong_parameters.rb","position":18,"original_position":18,"commit_id":"ae8f226130bfeb6d7a1974b7743df53b8c6e0e6a","original_commit_id":"ae8f226130bfeb6d7a1974b7743df53b8c6e0e6a","user":{"login":"gmcgibbon","id":5162312,"avatar_url":"https://avatars0.githubusercontent.com/u/5162312?v=4","gravatar_id":"","url":"https://api.github.com/users/gmcgibbon","html_url":"https://github.com/gmcgibbon","followers_url":"https://api.github.com/users/gmcgibbon/followers","following_url":"https://api.github.com/users/gmcgibbon/following{/other_user}","gists_url":"https://api.github.com/users/gmcgibbon/gists{/gist_id}","starred_url":"https://api.github.com/users/gmcgibbon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmcgibbon/subscriptions","organizations_url":"https://api.github.com/users/gmcgibbon/orgs","repos_url":"https://api.github.com/users/gmcgibbon/repos","events_url":"https://api.github.com/users/gmcgibbon/events{/privacy}","received_events_url":"https://api.github.com/users/gmcgibbon/received_events","type":"User","site_admin":false},"body":"This makes sense, we're only checking if one or more a numeric. Maybe we should rename this method (and the class level one too) to `#nested_attributes?` or `#nested?` instead. I think `#field_for_style?` is too married to the concept of form data.","created_at":"2018-05-02T04:30:49Z","updated_at":"2018-05-02T04:43:01Z","html_url":"https://github.com/rails/rails/pull/30033#discussion_r185391165","pull_request_url":"https://api.github.com/repos/rails/rails/pulls/30033","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/comments/185391165"},"html":{"href":"https://github.com/rails/rails/pull/30033#discussion_r185391165"},"pull_request":{"href":"https://api.github.com/repos/rails/rails/pulls/30033"}}},"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/30033","id":133541895,"html_url":"https://github.com/rails/rails/pull/30033","diff_url":"https://github.com/rails/rails/pull/30033.diff","patch_url":"https://github.com/rails/rails/pull/30033.patch","issue_url":"https://api.github.com/repos/rails/rails/issues/30033","number":30033,"state":"open","locked":false,"title":"fixed usage of Parameters with non-numeric key in nested attributes","user":{"login":"lfekson","id":11577514,"avatar_url":"https://avatars1.githubusercontent.com/u/11577514?v=4","gravatar_id":"","url":"https://api.github.com/users/lfekson","html_url":"https://github.com/lfekson","followers_url":"https://api.github.com/users/lfekson/followers","following_url":"https://api.github.com/users/lfekson/following{/other_user}","gists_url":"https://api.github.com/users/lfekson/gists{/gist_id}","starred_url":"https://api.github.com/users/lfekson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lfekson/subscriptions","organizations_url":"https://api.github.com/users/lfekson/orgs","repos_url":"https://api.github.com/users/lfekson/repos","events_url":"https://api.github.com/users/lfekson/events{/privacy}","received_events_url":"https://api.github.com/users/lfekson/received_events","type":"User","site_admin":false},"body":"### Summary\r\nFixes #29888\r\n\"Parameters\" object that includes nested attributes as { \"tests_attributes\" => { \"111\" => { \"name\" => \"aaa\" }, \"new_record\" => { \"name\" => \"bbb\" } } } now doesn't remove the whole \"tests_attributes\" hash, but keeps  { \"tests_attributes\" => { \"111\" => { \"name\" => \"aaa\" } } }  part of it.\r\n","created_at":"2017-08-01T18:34:42Z","updated_at":"2018-05-02T04:43:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bb15d4efa9ce6becb2941796ea448aad969d90aa","assignee":{"login":"schneems","id":59744,"avatar_url":"https://avatars2.githubusercontent.com/u/59744?v=4","gravatar_id":"","url":"https://api.github.com/users/schneems","html_url":"https://github.com/schneems","followers_url":"https://api.github.com/users/schneems/followers","following_url":"https://api.github.com/users/schneems/following{/other_user}","gists_url":"https://api.github.com/users/schneems/gists{/gist_id}","starred_url":"https://api.github.com/users/schneems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schneems/subscriptions","organizations_url":"https://api.github.com/users/schneems/orgs","repos_url":"https://api.github.com/users/schneems/repos","events_url":"https://api.github.com/users/schneems/events{/privacy}","received_events_url":"https://api.github.com/users/schneems/received_events","type":"User","site_admin":false},"assignees":[{"login":"schneems","id":59744,"avatar_url":"https://avatars2.githubusercontent.com/u/59744?v=4","gravatar_id":"","url":"https://api.github.com/users/schneems","html_url":"https://github.com/schneems","followers_url":"https://api.github.com/users/schneems/followers","following_url":"https://api.github.com/users/schneems/following{/other_user}","gists_url":"https://api.github.com/users/schneems/gists{/gist_id}","starred_url":"https://api.github.com/users/schneems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schneems/subscriptions","organizations_url":"https://api.github.com/users/schneems/orgs","repos_url":"https://api.github.com/users/schneems/repos","events_url":"https://api.github.com/users/schneems/events{/privacy}","received_events_url":"https://api.github.com/users/schneems/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rails/rails/pulls/30033/commits","review_comments_url":"https://api.github.com/repos/rails/rails/pulls/30033/comments","review_comment_url":"https://api.github.com/repos/rails/rails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rails/rails/issues/30033/comments","statuses_url":"https://api.github.com/repos/rails/rails/statuses/ae8f226130bfeb6d7a1974b7743df53b8c6e0e6a","head":{"label":"csb-ric:master","ref":"master","sha":"ae8f226130bfeb6d7a1974b7743df53b8c6e0e6a","user":{"login":"csb-ric","id":9605265,"avatar_url":"https://avatars1.githubusercontent.com/u/9605265?v=4","gravatar_id":"","url":"https://api.github.com/users/csb-ric","html_url":"https://github.com/csb-ric","followers_url":"https://api.github.com/users/csb-ric/followers","following_url":"https://api.github.com/users/csb-ric/following{/other_user}","gists_url":"https://api.github.com/users/csb-ric/gists{/gist_id}","starred_url":"https://api.github.com/users/csb-ric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csb-ric/subscriptions","organizations_url":"https://api.github.com/users/csb-ric/orgs","repos_url":"https://api.github.com/users/csb-ric/repos","events_url":"https://api.github.com/users/csb-ric/events{/privacy}","received_events_url":"https://api.github.com/users/csb-ric/received_events","type":"Organization","site_admin":false},"repo":{"id":99026976,"name":"rails","full_name":"csb-ric/rails","owner":{"login":"csb-ric","id":9605265,"avatar_url":"https://avatars1.githubusercontent.com/u/9605265?v=4","gravatar_id":"","url":"https://api.github.com/users/csb-ric","html_url":"https://github.com/csb-ric","followers_url":"https://api.github.com/users/csb-ric/followers","following_url":"https://api.github.com/users/csb-ric/following{/other_user}","gists_url":"https://api.github.com/users/csb-ric/gists{/gist_id}","starred_url":"https://api.github.com/users/csb-ric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csb-ric/subscriptions","organizations_url":"https://api.github.com/users/csb-ric/orgs","repos_url":"https://api.github.com/users/csb-ric/repos","events_url":"https://api.github.com/users/csb-ric/events{/privacy}","received_events_url":"https://api.github.com/users/csb-ric/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/csb-ric/rails","description":"Ruby on Rails","fork":true,"url":"https://api.github.com/repos/csb-ric/rails","forks_url":"https://api.github.com/repos/csb-ric/rails/forks","keys_url":"https://api.github.com/repos/csb-ric/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/csb-ric/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/csb-ric/rails/teams","hooks_url":"https://api.github.com/repos/csb-ric/rails/hooks","issue_events_url":"https://api.github.com/repos/csb-ric/rails/issues/events{/number}","events_url":"https://api.github.com/repos/csb-ric/rails/events","assignees_url":"https://api.github.com/repos/csb-ric/rails/assignees{/user}","branches_url":"https://api.github.com/repos/csb-ric/rails/branches{/branch}","tags_url":"https://api.github.com/repos/csb-ric/rails/tags","blobs_url":"https://api.github.com/repos/csb-ric/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/csb-ric/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/csb-ric/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/csb-ric/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/csb-ric/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/csb-ric/rails/languages","stargazers_url":"https://api.github.com/repos/csb-ric/rails/stargazers","contributors_url":"https://api.github.com/repos/csb-ric/rails/contributors","subscribers_url":"https://api.github.com/repos/csb-ric/rails/subscribers","subscription_url":"https://api.github.com/repos/csb-ric/rails/subscription","commits_url":"https://api.github.com/repos/csb-ric/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/csb-ric/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/csb-ric/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/csb-ric/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/csb-ric/rails/contents/{+path}","compare_url":"https://api.github.com/repos/csb-ric/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/csb-ric/rails/merges","archive_url":"https://api.github.com/repos/csb-ric/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/csb-ric/rails/downloads","issues_url":"https://api.github.com/repos/csb-ric/rails/issues{/number}","pulls_url":"https://api.github.com/repos/csb-ric/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/csb-ric/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/csb-ric/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/csb-ric/rails/labels{/name}","releases_url":"https://api.github.com/repos/csb-ric/rails/releases{/id}","deployments_url":"https://api.github.com/repos/csb-ric/rails/deployments","created_at":"2017-08-01T17:33:25Z","updated_at":"2017-08-01T17:34:11Z","pushed_at":"2017-08-01T20:16:54Z","git_url":"git://github.com/csb-ric/rails.git","ssh_url":"git@github.com:csb-ric/rails.git","clone_url":"https://github.com/csb-ric/rails.git","svn_url":"https://github.com/csb-ric/rails","homepage":"http://rubyonrails.org","size":153578,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rails:master","ref":"master","sha":"9e3d8cbd0705cacf424ef4f99d2e317168442065","user":{"login":"rails","id":4223,"avatar_url":"https://avatars1.githubusercontent.com/u/4223?v=4","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://avatars1.githubusercontent.com/u/4223?v=4","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}","deployments_url":"https://api.github.com/repos/rails/rails/deployments","created_at":"2008-04-11T02:19:47Z","updated_at":"2018-05-02T03:49:01Z","pushed_at":"2018-05-02T03:26:11Z","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":163678,"stargazers_count":39507,"watchers_count":39507,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":15974,"mirror_url":null,"archived":false,"open_issues_count":1055,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":15974,"open_issues":1055,"watchers":39507,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/30033"},"html":{"href":"https://github.com/rails/rails/pull/30033"},"issue":{"href":"https://api.github.com/repos/rails/rails/issues/30033"},"comments":{"href":"https://api.github.com/repos/rails/rails/issues/30033/comments"},"review_comments":{"href":"https://api.github.com/repos/rails/rails/pulls/30033/comments"},"review_comment":{"href":"https://api.github.com/repos/rails/rails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rails/rails/pulls/30033/commits"},"statuses":{"href":"https://api.github.com/repos/rails/rails/statuses/ae8f226130bfeb6d7a1974b7743df53b8c6e0e6a"}},"author_association":"NONE"}}
{"actor":{"display_login":"gmcgibbon"}}