{"action":"created","comment":{"url":"https://api.github.com/repos/mikedao/dinner_dash/pulls/comments/23648946","id":23648946,"diff_hunk":"@@ -2,9 +2,13 @@ class AdminController < ApplicationController\n   before_action :authorize\n   def index\n     if params[:status].nil? || params[:status] == \"all\"\n-      @orders = Order.all\n+      @orders = all_orders\n     else\n       @orders = Order.where(\"status = ?\", params[:status])\n     end\n   end\n+\n+  def all_orders\n+    Order.all\n+  end","path":"app/controllers/admin_controller.rb","position":13,"original_position":13,"commit_id":"c07ff6c14e0783a93e1b71ea53ef3ab530756ece","original_commit_id":"c07ff6c14e0783a93e1b71ea53ef3ab530756ece","user":{"login":"mikedao","id":3011748,"avatar_url":"https://avatars.githubusercontent.com/u/3011748?v=3","gravatar_id":"","url":"https://api.github.com/users/mikedao","html_url":"https://github.com/mikedao","followers_url":"https://api.github.com/users/mikedao/followers","following_url":"https://api.github.com/users/mikedao/following{/other_user}","gists_url":"https://api.github.com/users/mikedao/gists{/gist_id}","starred_url":"https://api.github.com/users/mikedao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikedao/subscriptions","organizations_url":"https://api.github.com/users/mikedao/orgs","repos_url":"https://api.github.com/users/mikedao/repos","events_url":"https://api.github.com/users/mikedao/events{/privacy}","received_events_url":"https://api.github.com/users/mikedao/received_events","type":"User","site_admin":false},"body":"Why this change? Is this a change where a scope would make more sense?\r\n\r\n","created_at":"2015-01-27T22:26:47Z","updated_at":"2015-01-27T22:26:47Z","html_url":"https://github.com/mikedao/dinner_dash/pull/168#discussion_r23648946","pull_request_url":"https://api.github.com/repos/mikedao/dinner_dash/pulls/168","_links":{"self":{"href":"https://api.github.com/repos/mikedao/dinner_dash/pulls/comments/23648946"},"html":{"href":"https://github.com/mikedao/dinner_dash/pull/168#discussion_r23648946"},"pull_request":{"href":"https://api.github.com/repos/mikedao/dinner_dash/pulls/168"}}},"pull_request":{"url":"https://api.github.com/repos/mikedao/dinner_dash/pulls/168","id":28144933,"html_url":"https://github.com/mikedao/dinner_dash/pull/168","diff_url":"https://github.com/mikedao/dinner_dash/pull/168.diff","patch_url":"https://github.com/mikedao/dinner_dash/pull/168.patch","issue_url":"https://api.github.com/repos/mikedao/dinner_dash/issues/168","number":168,"state":"open","locked":false,"title":"[WIP do not merge] Allow admin to change order status; closes #108","user":{"login":"EmilyMB","id":8007635,"avatar_url":"https://avatars.githubusercontent.com/u/8007635?v=3","gravatar_id":"","url":"https://api.github.com/users/EmilyMB","html_url":"https://github.com/EmilyMB","followers_url":"https://api.github.com/users/EmilyMB/followers","following_url":"https://api.github.com/users/EmilyMB/following{/other_user}","gists_url":"https://api.github.com/users/EmilyMB/gists{/gist_id}","starred_url":"https://api.github.com/users/EmilyMB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EmilyMB/subscriptions","organizations_url":"https://api.github.com/users/EmilyMB/orgs","repos_url":"https://api.github.com/users/EmilyMB/repos","events_url":"https://api.github.com/users/EmilyMB/events{/privacy}","received_events_url":"https://api.github.com/users/EmilyMB/received_events","type":"User","site_admin":false},"body":"Adds new functionality on the admin dashboard:\r\n\r\nAs an admin, I can:\r\n1. click link \"cancel\" to change orders which are currently \"ordered\" or \"paid\" to \"cancelled\"\r\n2. click link \"mark as paid\" to change orders which are \"ordered\" to \"paid\"\r\n3. click link to \"mark as completed\"  to change orders which are currently \"paid\" to \"completed\"\r\n4. see the total count of orders by status.","created_at":"2015-01-27T21:14:07Z","updated_at":"2015-01-27T22:26:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ee6531cef7877e6b4ca2eae77ab90c365ce7621a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mikedao/dinner_dash/pulls/168/commits","review_comments_url":"https://api.github.com/repos/mikedao/dinner_dash/pulls/168/comments","review_comment_url":"https://api.github.com/repos/mikedao/dinner_dash/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mikedao/dinner_dash/issues/168/comments","statuses_url":"https://api.github.com/repos/mikedao/dinner_dash/statuses/c07ff6c14e0783a93e1b71ea53ef3ab530756ece","head":{"label":"mikedao:admin_change_order_status","ref":"admin_change_order_status","sha":"c07ff6c14e0783a93e1b71ea53ef3ab530756ece","user":{"login":"mikedao","id":3011748,"avatar_url":"https://avatars.githubusercontent.com/u/3011748?v=3","gravatar_id":"","url":"https://api.github.com/users/mikedao","html_url":"https://github.com/mikedao","followers_url":"https://api.github.com/users/mikedao/followers","following_url":"https://api.github.com/users/mikedao/following{/other_user}","gists_url":"https://api.github.com/users/mikedao/gists{/gist_id}","starred_url":"https://api.github.com/users/mikedao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikedao/subscriptions","organizations_url":"https://api.github.com/users/mikedao/orgs","repos_url":"https://api.github.com/users/mikedao/repos","events_url":"https://api.github.com/users/mikedao/events{/privacy}","received_events_url":"https://api.github.com/users/mikedao/received_events","type":"User","site_admin":false},"repo":{"id":29539006,"name":"dinner_dash","full_name":"mikedao/dinner_dash","owner":{"login":"mikedao","id":3011748,"avatar_url":"https://avatars.githubusercontent.com/u/3011748?v=3","gravatar_id":"","url":"https://api.github.com/users/mikedao","html_url":"https://github.com/mikedao","followers_url":"https://api.github.com/users/mikedao/followers","following_url":"https://api.github.com/users/mikedao/following{/other_user}","gists_url":"https://api.github.com/users/mikedao/gists{/gist_id}","starred_url":"https://api.github.com/users/mikedao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikedao/subscriptions","organizations_url":"https://api.github.com/users/mikedao/orgs","repos_url":"https://api.github.com/users/mikedao/repos","events_url":"https://api.github.com/users/mikedao/events{/privacy}","received_events_url":"https://api.github.com/users/mikedao/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mikedao/dinner_dash","description":"","fork":false,"url":"https://api.github.com/repos/mikedao/dinner_dash","forks_url":"https://api.github.com/repos/mikedao/dinner_dash/forks","keys_url":"https://api.github.com/repos/mikedao/dinner_dash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mikedao/dinner_dash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mikedao/dinner_dash/teams","hooks_url":"https://api.github.com/repos/mikedao/dinner_dash/hooks","issue_events_url":"https://api.github.com/repos/mikedao/dinner_dash/issues/events{/number}","events_url":"https://api.github.com/repos/mikedao/dinner_dash/events","assignees_url":"https://api.github.com/repos/mikedao/dinner_dash/assignees{/user}","branches_url":"https://api.github.com/repos/mikedao/dinner_dash/branches{/branch}","tags_url":"https://api.github.com/repos/mikedao/dinner_dash/tags","blobs_url":"https://api.github.com/repos/mikedao/dinner_dash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mikedao/dinner_dash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mikedao/dinner_dash/git/refs{/sha}","trees_url":"https://api.github.com/repos/mikedao/dinner_dash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mikedao/dinner_dash/statuses/{sha}","languages_url":"https://api.github.com/repos/mikedao/dinner_dash/languages","stargazers_url":"https://api.github.com/repos/mikedao/dinner_dash/stargazers","contributors_url":"https://api.github.com/repos/mikedao/dinner_dash/contributors","subscribers_url":"https://api.github.com/repos/mikedao/dinner_dash/subscribers","subscription_url":"https://api.github.com/repos/mikedao/dinner_dash/subscription","commits_url":"https://api.github.com/repos/mikedao/dinner_dash/commits{/sha}","git_commits_url":"https://api.github.com/repos/mikedao/dinner_dash/git/commits{/sha}","comments_url":"https://api.github.com/repos/mikedao/dinner_dash/comments{/number}","issue_comment_url":"https://api.github.com/repos/mikedao/dinner_dash/issues/comments/{number}","contents_url":"https://api.github.com/repos/mikedao/dinner_dash/contents/{+path}","compare_url":"https://api.github.com/repos/mikedao/dinner_dash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mikedao/dinner_dash/merges","archive_url":"https://api.github.com/repos/mikedao/dinner_dash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mikedao/dinner_dash/downloads","issues_url":"https://api.github.com/repos/mikedao/dinner_dash/issues{/number}","pulls_url":"https://api.github.com/repos/mikedao/dinner_dash/pulls{/number}","milestones_url":"https://api.github.com/repos/mikedao/dinner_dash/milestones{/number}","notifications_url":"https://api.github.com/repos/mikedao/dinner_dash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mikedao/dinner_dash/labels{/name}","releases_url":"https://api.github.com/repos/mikedao/dinner_dash/releases{/id}","created_at":"2015-01-20T16:21:23Z","updated_at":"2015-01-27T22:12:19Z","pushed_at":"2015-01-27T22:23:03Z","git_url":"git://github.com/mikedao/dinner_dash.git","ssh_url":"git@github.com:mikedao/dinner_dash.git","clone_url":"https://github.com/mikedao/dinner_dash.git","svn_url":"https://github.com/mikedao/dinner_dash","homepage":null,"size":3899,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":22,"forks":1,"open_issues":22,"watchers":0,"default_branch":"master"}},"base":{"label":"mikedao:master","ref":"master","sha":"c0a5ba0a4d99bcb7a381545f9c26aaa5fbe7c100","user":{"login":"mikedao","id":3011748,"avatar_url":"https://avatars.githubusercontent.com/u/3011748?v=3","gravatar_id":"","url":"https://api.github.com/users/mikedao","html_url":"https://github.com/mikedao","followers_url":"https://api.github.com/users/mikedao/followers","following_url":"https://api.github.com/users/mikedao/following{/other_user}","gists_url":"https://api.github.com/users/mikedao/gists{/gist_id}","starred_url":"https://api.github.com/users/mikedao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikedao/subscriptions","organizations_url":"https://api.github.com/users/mikedao/orgs","repos_url":"https://api.github.com/users/mikedao/repos","events_url":"https://api.github.com/users/mikedao/events{/privacy}","received_events_url":"https://api.github.com/users/mikedao/received_events","type":"User","site_admin":false},"repo":{"id":29539006,"name":"dinner_dash","full_name":"mikedao/dinner_dash","owner":{"login":"mikedao","id":3011748,"avatar_url":"https://avatars.githubusercontent.com/u/3011748?v=3","gravatar_id":"","url":"https://api.github.com/users/mikedao","html_url":"https://github.com/mikedao","followers_url":"https://api.github.com/users/mikedao/followers","following_url":"https://api.github.com/users/mikedao/following{/other_user}","gists_url":"https://api.github.com/users/mikedao/gists{/gist_id}","starred_url":"https://api.github.com/users/mikedao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikedao/subscriptions","organizations_url":"https://api.github.com/users/mikedao/orgs","repos_url":"https://api.github.com/users/mikedao/repos","events_url":"https://api.github.com/users/mikedao/events{/privacy}","received_events_url":"https://api.github.com/users/mikedao/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mikedao/dinner_dash","description":"","fork":false,"url":"https://api.github.com/repos/mikedao/dinner_dash","forks_url":"https://api.github.com/repos/mikedao/dinner_dash/forks","keys_url":"https://api.github.com/repos/mikedao/dinner_dash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mikedao/dinner_dash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mikedao/dinner_dash/teams","hooks_url":"https://api.github.com/repos/mikedao/dinner_dash/hooks","issue_events_url":"https://api.github.com/repos/mikedao/dinner_dash/issues/events{/number}","events_url":"https://api.github.com/repos/mikedao/dinner_dash/events","assignees_url":"https://api.github.com/repos/mikedao/dinner_dash/assignees{/user}","branches_url":"https://api.github.com/repos/mikedao/dinner_dash/branches{/branch}","tags_url":"https://api.github.com/repos/mikedao/dinner_dash/tags","blobs_url":"https://api.github.com/repos/mikedao/dinner_dash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mikedao/dinner_dash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mikedao/dinner_dash/git/refs{/sha}","trees_url":"https://api.github.com/repos/mikedao/dinner_dash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mikedao/dinner_dash/statuses/{sha}","languages_url":"https://api.github.com/repos/mikedao/dinner_dash/languages","stargazers_url":"https://api.github.com/repos/mikedao/dinner_dash/stargazers","contributors_url":"https://api.github.com/repos/mikedao/dinner_dash/contributors","subscribers_url":"https://api.github.com/repos/mikedao/dinner_dash/subscribers","subscription_url":"https://api.github.com/repos/mikedao/dinner_dash/subscription","commits_url":"https://api.github.com/repos/mikedao/dinner_dash/commits{/sha}","git_commits_url":"https://api.github.com/repos/mikedao/dinner_dash/git/commits{/sha}","comments_url":"https://api.github.com/repos/mikedao/dinner_dash/comments{/number}","issue_comment_url":"https://api.github.com/repos/mikedao/dinner_dash/issues/comments/{number}","contents_url":"https://api.github.com/repos/mikedao/dinner_dash/contents/{+path}","compare_url":"https://api.github.com/repos/mikedao/dinner_dash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mikedao/dinner_dash/merges","archive_url":"https://api.github.com/repos/mikedao/dinner_dash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mikedao/dinner_dash/downloads","issues_url":"https://api.github.com/repos/mikedao/dinner_dash/issues{/number}","pulls_url":"https://api.github.com/repos/mikedao/dinner_dash/pulls{/number}","milestones_url":"https://api.github.com/repos/mikedao/dinner_dash/milestones{/number}","notifications_url":"https://api.github.com/repos/mikedao/dinner_dash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mikedao/dinner_dash/labels{/name}","releases_url":"https://api.github.com/repos/mikedao/dinner_dash/releases{/id}","created_at":"2015-01-20T16:21:23Z","updated_at":"2015-01-27T22:12:19Z","pushed_at":"2015-01-27T22:23:03Z","git_url":"git://github.com/mikedao/dinner_dash.git","ssh_url":"git@github.com:mikedao/dinner_dash.git","clone_url":"https://github.com/mikedao/dinner_dash.git","svn_url":"https://github.com/mikedao/dinner_dash","homepage":null,"size":3899,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":22,"forks":1,"open_issues":22,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mikedao/dinner_dash/pulls/168"},"html":{"href":"https://github.com/mikedao/dinner_dash/pull/168"},"issue":{"href":"https://api.github.com/repos/mikedao/dinner_dash/issues/168"},"comments":{"href":"https://api.github.com/repos/mikedao/dinner_dash/issues/168/comments"},"review_comments":{"href":"https://api.github.com/repos/mikedao/dinner_dash/pulls/168/comments"},"review_comment":{"href":"https://api.github.com/repos/mikedao/dinner_dash/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mikedao/dinner_dash/pulls/168/commits"},"statuses":{"href":"https://api.github.com/repos/mikedao/dinner_dash/statuses/c07ff6c14e0783a93e1b71ea53ef3ab530756ece"}}}}