{"action":"opened","number":200,"pull_request":{"url":"https://api.github.com/repos/rails-api/rails-api/pulls/200","id":36792952,"html_url":"https://github.com/rails-api/rails-api/pull/200","diff_url":"https://github.com/rails-api/rails-api/pull/200.diff","patch_url":"https://github.com/rails-api/rails-api/pull/200.patch","issue_url":"https://api.github.com/repos/rails-api/rails-api/issues/200","number":200,"state":"open","locked":false,"title":"Scope generator","user":{"login":"ptashman","id":1157220,"avatar_url":"https://avatars.githubusercontent.com/u/1157220?v=3","gravatar_id":"","url":"https://api.github.com/users/ptashman","html_url":"https://github.com/ptashman","followers_url":"https://api.github.com/users/ptashman/followers","following_url":"https://api.github.com/users/ptashman/following{/other_user}","gists_url":"https://api.github.com/users/ptashman/gists{/gist_id}","starred_url":"https://api.github.com/users/ptashman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptashman/subscriptions","organizations_url":"https://api.github.com/users/ptashman/orgs","repos_url":"https://api.github.com/users/ptashman/repos","events_url":"https://api.github.com/users/ptashman/events{/privacy}","received_events_url":"https://api.github.com/users/ptashman/received_events","type":"User","site_admin":false},"body":"This adds a generator for scopes. The user runs \"rails g scope\" and passes in a resource name and a scope name. The generator then adds a route for the scoped collection, a controller action for the scope, as well as the scope itself. The user will then be able to view the scoped collection via \"/resource_name/scope_name\". Please let me know if you have any questions or suggestions. Thanks!","created_at":"2015-06-03T02:16:42Z","updated_at":"2015-06-03T02:16:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rails-api/rails-api/pulls/200/commits","review_comments_url":"https://api.github.com/repos/rails-api/rails-api/pulls/200/comments","review_comment_url":"https://api.github.com/repos/rails-api/rails-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rails-api/rails-api/issues/200/comments","statuses_url":"https://api.github.com/repos/rails-api/rails-api/statuses/e1456f73f53d0c88da8a867c56f0c97120d7a3f8","head":{"label":"ptashman:scope_generator","ref":"scope_generator","sha":"e1456f73f53d0c88da8a867c56f0c97120d7a3f8","user":{"login":"ptashman","id":1157220,"avatar_url":"https://avatars.githubusercontent.com/u/1157220?v=3","gravatar_id":"","url":"https://api.github.com/users/ptashman","html_url":"https://github.com/ptashman","followers_url":"https://api.github.com/users/ptashman/followers","following_url":"https://api.github.com/users/ptashman/following{/other_user}","gists_url":"https://api.github.com/users/ptashman/gists{/gist_id}","starred_url":"https://api.github.com/users/ptashman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptashman/subscriptions","organizations_url":"https://api.github.com/users/ptashman/orgs","repos_url":"https://api.github.com/users/ptashman/repos","events_url":"https://api.github.com/users/ptashman/events{/privacy}","received_events_url":"https://api.github.com/users/ptashman/received_events","type":"User","site_admin":false},"repo":{"id":36739171,"name":"rails-api","full_name":"ptashman/rails-api","owner":{"login":"ptashman","id":1157220,"avatar_url":"https://avatars.githubusercontent.com/u/1157220?v=3","gravatar_id":"","url":"https://api.github.com/users/ptashman","html_url":"https://github.com/ptashman","followers_url":"https://api.github.com/users/ptashman/followers","following_url":"https://api.github.com/users/ptashman/following{/other_user}","gists_url":"https://api.github.com/users/ptashman/gists{/gist_id}","starred_url":"https://api.github.com/users/ptashman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptashman/subscriptions","organizations_url":"https://api.github.com/users/ptashman/orgs","repos_url":"https://api.github.com/users/ptashman/repos","events_url":"https://api.github.com/users/ptashman/events{/privacy}","received_events_url":"https://api.github.com/users/ptashman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ptashman/rails-api","description":"Rails for API only applications","fork":true,"url":"https://api.github.com/repos/ptashman/rails-api","forks_url":"https://api.github.com/repos/ptashman/rails-api/forks","keys_url":"https://api.github.com/repos/ptashman/rails-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ptashman/rails-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ptashman/rails-api/teams","hooks_url":"https://api.github.com/repos/ptashman/rails-api/hooks","issue_events_url":"https://api.github.com/repos/ptashman/rails-api/issues/events{/number}","events_url":"https://api.github.com/repos/ptashman/rails-api/events","assignees_url":"https://api.github.com/repos/ptashman/rails-api/assignees{/user}","branches_url":"https://api.github.com/repos/ptashman/rails-api/branches{/branch}","tags_url":"https://api.github.com/repos/ptashman/rails-api/tags","blobs_url":"https://api.github.com/repos/ptashman/rails-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ptashman/rails-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ptashman/rails-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/ptashman/rails-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ptashman/rails-api/statuses/{sha}","languages_url":"https://api.github.com/repos/ptashman/rails-api/languages","stargazers_url":"https://api.github.com/repos/ptashman/rails-api/stargazers","contributors_url":"https://api.github.com/repos/ptashman/rails-api/contributors","subscribers_url":"https://api.github.com/repos/ptashman/rails-api/subscribers","subscription_url":"https://api.github.com/repos/ptashman/rails-api/subscription","commits_url":"https://api.github.com/repos/ptashman/rails-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/ptashman/rails-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/ptashman/rails-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/ptashman/rails-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/ptashman/rails-api/contents/{+path}","compare_url":"https://api.github.com/repos/ptashman/rails-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ptashman/rails-api/merges","archive_url":"https://api.github.com/repos/ptashman/rails-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ptashman/rails-api/downloads","issues_url":"https://api.github.com/repos/ptashman/rails-api/issues{/number}","pulls_url":"https://api.github.com/repos/ptashman/rails-api/pulls{/number}","milestones_url":"https://api.github.com/repos/ptashman/rails-api/milestones{/number}","notifications_url":"https://api.github.com/repos/ptashman/rails-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ptashman/rails-api/labels{/name}","releases_url":"https://api.github.com/repos/ptashman/rails-api/releases{/id}","created_at":"2015-06-02T14:33:37Z","updated_at":"2015-06-02T14:33:37Z","pushed_at":"2015-06-03T02:05:44Z","git_url":"git://github.com/ptashman/rails-api.git","ssh_url":"git@github.com:ptashman/rails-api.git","clone_url":"https://github.com/ptashman/rails-api.git","svn_url":"https://github.com/ptashman/rails-api","homepage":"","size":1066,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"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-api:master","ref":"master","sha":"67115bc06ee388db5b8e70822553db686745097c","user":{"login":"rails-api","id":2820360,"avatar_url":"https://avatars.githubusercontent.com/u/2820360?v=3","gravatar_id":"","url":"https://api.github.com/users/rails-api","html_url":"https://github.com/rails-api","followers_url":"https://api.github.com/users/rails-api/followers","following_url":"https://api.github.com/users/rails-api/following{/other_user}","gists_url":"https://api.github.com/users/rails-api/gists{/gist_id}","starred_url":"https://api.github.com/users/rails-api/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails-api/subscriptions","organizations_url":"https://api.github.com/users/rails-api/orgs","repos_url":"https://api.github.com/users/rails-api/repos","events_url":"https://api.github.com/users/rails-api/events{/privacy}","received_events_url":"https://api.github.com/users/rails-api/received_events","type":"Organization","site_admin":false},"repo":{"id":3748229,"name":"rails-api","full_name":"rails-api/rails-api","owner":{"login":"rails-api","id":2820360,"avatar_url":"https://avatars.githubusercontent.com/u/2820360?v=3","gravatar_id":"","url":"https://api.github.com/users/rails-api","html_url":"https://github.com/rails-api","followers_url":"https://api.github.com/users/rails-api/followers","following_url":"https://api.github.com/users/rails-api/following{/other_user}","gists_url":"https://api.github.com/users/rails-api/gists{/gist_id}","starred_url":"https://api.github.com/users/rails-api/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails-api/subscriptions","organizations_url":"https://api.github.com/users/rails-api/orgs","repos_url":"https://api.github.com/users/rails-api/repos","events_url":"https://api.github.com/users/rails-api/events{/privacy}","received_events_url":"https://api.github.com/users/rails-api/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rails-api/rails-api","description":"Rails for API only applications","fork":false,"url":"https://api.github.com/repos/rails-api/rails-api","forks_url":"https://api.github.com/repos/rails-api/rails-api/forks","keys_url":"https://api.github.com/repos/rails-api/rails-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rails-api/rails-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rails-api/rails-api/teams","hooks_url":"https://api.github.com/repos/rails-api/rails-api/hooks","issue_events_url":"https://api.github.com/repos/rails-api/rails-api/issues/events{/number}","events_url":"https://api.github.com/repos/rails-api/rails-api/events","assignees_url":"https://api.github.com/repos/rails-api/rails-api/assignees{/user}","branches_url":"https://api.github.com/repos/rails-api/rails-api/branches{/branch}","tags_url":"https://api.github.com/repos/rails-api/rails-api/tags","blobs_url":"https://api.github.com/repos/rails-api/rails-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rails-api/rails-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rails-api/rails-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/rails-api/rails-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rails-api/rails-api/statuses/{sha}","languages_url":"https://api.github.com/repos/rails-api/rails-api/languages","stargazers_url":"https://api.github.com/repos/rails-api/rails-api/stargazers","contributors_url":"https://api.github.com/repos/rails-api/rails-api/contributors","subscribers_url":"https://api.github.com/repos/rails-api/rails-api/subscribers","subscription_url":"https://api.github.com/repos/rails-api/rails-api/subscription","commits_url":"https://api.github.com/repos/rails-api/rails-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/rails-api/rails-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/rails-api/rails-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/rails-api/rails-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/rails-api/rails-api/contents/{+path}","compare_url":"https://api.github.com/repos/rails-api/rails-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rails-api/rails-api/merges","archive_url":"https://api.github.com/repos/rails-api/rails-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rails-api/rails-api/downloads","issues_url":"https://api.github.com/repos/rails-api/rails-api/issues{/number}","pulls_url":"https://api.github.com/repos/rails-api/rails-api/pulls{/number}","milestones_url":"https://api.github.com/repos/rails-api/rails-api/milestones{/number}","notifications_url":"https://api.github.com/repos/rails-api/rails-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rails-api/rails-api/labels{/name}","releases_url":"https://api.github.com/repos/rails-api/rails-api/releases{/id}","created_at":"2012-03-17T14:39:31Z","updated_at":"2015-06-02T15:27:23Z","pushed_at":"2015-06-03T02:16:42Z","git_url":"git://github.com/rails-api/rails-api.git","ssh_url":"git@github.com:rails-api/rails-api.git","clone_url":"https://github.com/rails-api/rails-api.git","svn_url":"https://github.com/rails-api/rails-api","homepage":"","size":1066,"stargazers_count":4252,"watchers_count":4252,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":254,"mirror_url":null,"open_issues_count":7,"forks":254,"open_issues":7,"watchers":4252,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails-api/rails-api/pulls/200"},"html":{"href":"https://github.com/rails-api/rails-api/pull/200"},"issue":{"href":"https://api.github.com/repos/rails-api/rails-api/issues/200"},"comments":{"href":"https://api.github.com/repos/rails-api/rails-api/issues/200/comments"},"review_comments":{"href":"https://api.github.com/repos/rails-api/rails-api/pulls/200/comments"},"review_comment":{"href":"https://api.github.com/repos/rails-api/rails-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rails-api/rails-api/pulls/200/commits"},"statuses":{"href":"https://api.github.com/repos/rails-api/rails-api/statuses/e1456f73f53d0c88da8a867c56f0c97120d7a3f8"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":5,"additions":160,"deletions":0,"changed_files":5}}