{"action":"created","comment":{"url":"https://api.github.com/repos/zendesk/stronger_parameters/pulls/comments/116816637","pull_request_review_id":38468266,"id":116816637,"diff_hunk":"@@ -158,6 +158,68 @@ Just want to log violations in production:\n ActionController::Parameters.action_on_invalid_parameters = :log\n ```\n \n+## ControllerSupport::PermittedParameters\n+\n+When included into a controller, this module forces the developer\n+to explicitly whitelist which parameters are permitted for every action.\n+\n+Examples:\n+\n+```ruby\n+class TestController < ApplicationController\n+  include StrongerParameters::ControllerSupport::PermittedParameters\n+\n+  permitted_parameters :all, locale: Parameters.string # permit :locale in all actions for this controller\n+\n+  permitted_parameters :show, forum_id: Parameters.integer\n+  def show\n+  end\n+\n+  permitted_parameters :create, topic: { forum: { :id: Parameters.integer } }\n+  def create\n+  end\n+\n+  permitted_parameters :index, {} # no parameters permitted\n+  def index\n+  end\n+\n+  permitted_parameters :update, :anything # all parameters permitted, should only be used when migrating old controllers/actions","path":"README.md","position":29,"original_position":29,"commit_id":"d24e11f9778549fe2a16651b6e0fa3272f84f1f6","original_commit_id":"d24e11f9778549fe2a16651b6e0fa3272f84f1f6","user":{"login":"grosser","id":11367,"avatar_url":"https://avatars0.githubusercontent.com/u/11367?v=3","gravatar_id":"","url":"https://api.github.com/users/grosser","html_url":"https://github.com/grosser","followers_url":"https://api.github.com/users/grosser/followers","following_url":"https://api.github.com/users/grosser/following{/other_user}","gists_url":"https://api.github.com/users/grosser/gists{/gist_id}","starred_url":"https://api.github.com/users/grosser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grosser/subscriptions","organizations_url":"https://api.github.com/users/grosser/orgs","repos_url":"https://api.github.com/users/grosser/repos","events_url":"https://api.github.com/users/grosser/events{/privacy}","received_events_url":"https://api.github.com/users/grosser/received_events","type":"User","site_admin":false},"body":"`should only be used` -> `use`","created_at":"2017-05-16T18:09:53Z","updated_at":"2017-05-16T18:09:54Z","html_url":"https://github.com/zendesk/stronger_parameters/pull/44#discussion_r116816637","pull_request_url":"https://api.github.com/repos/zendesk/stronger_parameters/pulls/44","_links":{"self":{"href":"https://api.github.com/repos/zendesk/stronger_parameters/pulls/comments/116816637"},"html":{"href":"https://github.com/zendesk/stronger_parameters/pull/44#discussion_r116816637"},"pull_request":{"href":"https://api.github.com/repos/zendesk/stronger_parameters/pulls/44"}}},"pull_request":{"url":"https://api.github.com/repos/zendesk/stronger_parameters/pulls/44","id":120711422,"html_url":"https://github.com/zendesk/stronger_parameters/pull/44","diff_url":"https://github.com/zendesk/stronger_parameters/pull/44.diff","patch_url":"https://github.com/zendesk/stronger_parameters/pull/44.patch","issue_url":"https://api.github.com/repos/zendesk/stronger_parameters/issues/44","number":44,"state":"open","locked":false,"title":"ControllerSupport::ParameterWhitelist","user":{"login":"dadah89","id":697824,"avatar_url":"https://avatars1.githubusercontent.com/u/697824?v=3","gravatar_id":"","url":"https://api.github.com/users/dadah89","html_url":"https://github.com/dadah89","followers_url":"https://api.github.com/users/dadah89/followers","following_url":"https://api.github.com/users/dadah89/following{/other_user}","gists_url":"https://api.github.com/users/dadah89/gists{/gist_id}","starred_url":"https://api.github.com/users/dadah89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dadah89/subscriptions","organizations_url":"https://api.github.com/users/dadah89/orgs","repos_url":"https://api.github.com/users/dadah89/repos","events_url":"https://api.github.com/users/dadah89/events{/privacy}","received_events_url":"https://api.github.com/users/dadah89/received_events","type":"User","site_admin":false},"body":"/cc @grosser @pschambacher @zendesk/i18n-dev \r\n\r\n### Description\r\n\r\nControllerSupport::ParameterWhitelist: when included into a controller, this module forces the developer to explicitly whitelist which parameters are passed to any methods.\r\n\r\nREADME.md has a good description of what the module does.","created_at":"2017-05-15T22:48:56Z","updated_at":"2017-05-16T18:09:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"31fbd4ab99b502ac68333b6fe151e8b1a003d1d1","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/zendesk/stronger_parameters/pulls/44/commits","review_comments_url":"https://api.github.com/repos/zendesk/stronger_parameters/pulls/44/comments","review_comment_url":"https://api.github.com/repos/zendesk/stronger_parameters/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zendesk/stronger_parameters/issues/44/comments","statuses_url":"https://api.github.com/repos/zendesk/stronger_parameters/statuses/d24e11f9778549fe2a16651b6e0fa3272f84f1f6","head":{"label":"zendesk:igor/parameter_whitelist","ref":"igor/parameter_whitelist","sha":"d24e11f9778549fe2a16651b6e0fa3272f84f1f6","user":{"login":"zendesk","id":11525,"avatar_url":"https://avatars0.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"repo":{"id":14402050,"name":"stronger_parameters","full_name":"zendesk/stronger_parameters","owner":{"login":"zendesk","id":11525,"avatar_url":"https://avatars0.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zendesk/stronger_parameters","description":"Type checking and type casting of parameters for Action Pack","fork":false,"url":"https://api.github.com/repos/zendesk/stronger_parameters","forks_url":"https://api.github.com/repos/zendesk/stronger_parameters/forks","keys_url":"https://api.github.com/repos/zendesk/stronger_parameters/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zendesk/stronger_parameters/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zendesk/stronger_parameters/teams","hooks_url":"https://api.github.com/repos/zendesk/stronger_parameters/hooks","issue_events_url":"https://api.github.com/repos/zendesk/stronger_parameters/issues/events{/number}","events_url":"https://api.github.com/repos/zendesk/stronger_parameters/events","assignees_url":"https://api.github.com/repos/zendesk/stronger_parameters/assignees{/user}","branches_url":"https://api.github.com/repos/zendesk/stronger_parameters/branches{/branch}","tags_url":"https://api.github.com/repos/zendesk/stronger_parameters/tags","blobs_url":"https://api.github.com/repos/zendesk/stronger_parameters/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zendesk/stronger_parameters/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zendesk/stronger_parameters/git/refs{/sha}","trees_url":"https://api.github.com/repos/zendesk/stronger_parameters/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zendesk/stronger_parameters/statuses/{sha}","languages_url":"https://api.github.com/repos/zendesk/stronger_parameters/languages","stargazers_url":"https://api.github.com/repos/zendesk/stronger_parameters/stargazers","contributors_url":"https://api.github.com/repos/zendesk/stronger_parameters/contributors","subscribers_url":"https://api.github.com/repos/zendesk/stronger_parameters/subscribers","subscription_url":"https://api.github.com/repos/zendesk/stronger_parameters/subscription","commits_url":"https://api.github.com/repos/zendesk/stronger_parameters/commits{/sha}","git_commits_url":"https://api.github.com/repos/zendesk/stronger_parameters/git/commits{/sha}","comments_url":"https://api.github.com/repos/zendesk/stronger_parameters/comments{/number}","issue_comment_url":"https://api.github.com/repos/zendesk/stronger_parameters/issues/comments{/number}","contents_url":"https://api.github.com/repos/zendesk/stronger_parameters/contents/{+path}","compare_url":"https://api.github.com/repos/zendesk/stronger_parameters/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zendesk/stronger_parameters/merges","archive_url":"https://api.github.com/repos/zendesk/stronger_parameters/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zendesk/stronger_parameters/downloads","issues_url":"https://api.github.com/repos/zendesk/stronger_parameters/issues{/number}","pulls_url":"https://api.github.com/repos/zendesk/stronger_parameters/pulls{/number}","milestones_url":"https://api.github.com/repos/zendesk/stronger_parameters/milestones{/number}","notifications_url":"https://api.github.com/repos/zendesk/stronger_parameters/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zendesk/stronger_parameters/labels{/name}","releases_url":"https://api.github.com/repos/zendesk/stronger_parameters/releases{/id}","deployments_url":"https://api.github.com/repos/zendesk/stronger_parameters/deployments","created_at":"2013-11-14T17:26:08Z","updated_at":"2017-05-01T21:05:58Z","pushed_at":"2017-05-16T17:59:56Z","git_url":"git://github.com/zendesk/stronger_parameters.git","ssh_url":"git@github.com:zendesk/stronger_parameters.git","clone_url":"https://github.com/zendesk/stronger_parameters.git","svn_url":"https://github.com/zendesk/stronger_parameters","homepage":null,"size":106,"stargazers_count":114,"watchers_count":114,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":1,"forks":14,"open_issues":1,"watchers":114,"default_branch":"master"}},"base":{"label":"zendesk:master","ref":"master","sha":"02726cce3b7772653d3b4514fae210ee16928d87","user":{"login":"zendesk","id":11525,"avatar_url":"https://avatars0.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"repo":{"id":14402050,"name":"stronger_parameters","full_name":"zendesk/stronger_parameters","owner":{"login":"zendesk","id":11525,"avatar_url":"https://avatars0.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zendesk/stronger_parameters","description":"Type checking and type casting of parameters for Action Pack","fork":false,"url":"https://api.github.com/repos/zendesk/stronger_parameters","forks_url":"https://api.github.com/repos/zendesk/stronger_parameters/forks","keys_url":"https://api.github.com/repos/zendesk/stronger_parameters/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zendesk/stronger_parameters/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zendesk/stronger_parameters/teams","hooks_url":"https://api.github.com/repos/zendesk/stronger_parameters/hooks","issue_events_url":"https://api.github.com/repos/zendesk/stronger_parameters/issues/events{/number}","events_url":"https://api.github.com/repos/zendesk/stronger_parameters/events","assignees_url":"https://api.github.com/repos/zendesk/stronger_parameters/assignees{/user}","branches_url":"https://api.github.com/repos/zendesk/stronger_parameters/branches{/branch}","tags_url":"https://api.github.com/repos/zendesk/stronger_parameters/tags","blobs_url":"https://api.github.com/repos/zendesk/stronger_parameters/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zendesk/stronger_parameters/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zendesk/stronger_parameters/git/refs{/sha}","trees_url":"https://api.github.com/repos/zendesk/stronger_parameters/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zendesk/stronger_parameters/statuses/{sha}","languages_url":"https://api.github.com/repos/zendesk/stronger_parameters/languages","stargazers_url":"https://api.github.com/repos/zendesk/stronger_parameters/stargazers","contributors_url":"https://api.github.com/repos/zendesk/stronger_parameters/contributors","subscribers_url":"https://api.github.com/repos/zendesk/stronger_parameters/subscribers","subscription_url":"https://api.github.com/repos/zendesk/stronger_parameters/subscription","commits_url":"https://api.github.com/repos/zendesk/stronger_parameters/commits{/sha}","git_commits_url":"https://api.github.com/repos/zendesk/stronger_parameters/git/commits{/sha}","comments_url":"https://api.github.com/repos/zendesk/stronger_parameters/comments{/number}","issue_comment_url":"https://api.github.com/repos/zendesk/stronger_parameters/issues/comments{/number}","contents_url":"https://api.github.com/repos/zendesk/stronger_parameters/contents/{+path}","compare_url":"https://api.github.com/repos/zendesk/stronger_parameters/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zendesk/stronger_parameters/merges","archive_url":"https://api.github.com/repos/zendesk/stronger_parameters/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zendesk/stronger_parameters/downloads","issues_url":"https://api.github.com/repos/zendesk/stronger_parameters/issues{/number}","pulls_url":"https://api.github.com/repos/zendesk/stronger_parameters/pulls{/number}","milestones_url":"https://api.github.com/repos/zendesk/stronger_parameters/milestones{/number}","notifications_url":"https://api.github.com/repos/zendesk/stronger_parameters/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zendesk/stronger_parameters/labels{/name}","releases_url":"https://api.github.com/repos/zendesk/stronger_parameters/releases{/id}","deployments_url":"https://api.github.com/repos/zendesk/stronger_parameters/deployments","created_at":"2013-11-14T17:26:08Z","updated_at":"2017-05-01T21:05:58Z","pushed_at":"2017-05-16T17:59:56Z","git_url":"git://github.com/zendesk/stronger_parameters.git","ssh_url":"git@github.com:zendesk/stronger_parameters.git","clone_url":"https://github.com/zendesk/stronger_parameters.git","svn_url":"https://github.com/zendesk/stronger_parameters","homepage":null,"size":106,"stargazers_count":114,"watchers_count":114,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":1,"forks":14,"open_issues":1,"watchers":114,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zendesk/stronger_parameters/pulls/44"},"html":{"href":"https://github.com/zendesk/stronger_parameters/pull/44"},"issue":{"href":"https://api.github.com/repos/zendesk/stronger_parameters/issues/44"},"comments":{"href":"https://api.github.com/repos/zendesk/stronger_parameters/issues/44/comments"},"review_comments":{"href":"https://api.github.com/repos/zendesk/stronger_parameters/pulls/44/comments"},"review_comment":{"href":"https://api.github.com/repos/zendesk/stronger_parameters/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zendesk/stronger_parameters/pulls/44/commits"},"statuses":{"href":"https://api.github.com/repos/zendesk/stronger_parameters/statuses/d24e11f9778549fe2a16651b6e0fa3272f84f1f6"}}}}
{"actor":{"display_login":"grosser"}}