{"action":"created","comment":{"url":"https://api.github.com/repos/rubyforgood/share_christmas/pulls/comments/74707952","id":74707952,"diff_hunk":"@@ -1,12 +1,29 @@\n class RecipientsController < ApplicationController\n   def index\n-    head :not_implemented\n+    load_org_and_authorize\n+    @oc = find_organization_campaign\n+    @recipients = @oc.recipients\n+  end\n+\n+  def edit\n+    load_org_and_authorize\n+    @user = User.new\n+    @membership = Membership.new\n+    @recipient = Recipient.find(params[:id])\n+    @memberships = @org.memberships_sorted_by_name\n   end\n \n   def update\n     recipient = Recipient.find(params[:id])\n     recipient.update(membership_id: params[:recipient][:membership_id])\n-    flash[:message] = \"Thank you for helping #{recipient.first_name}!\"\n-    redirect_to user_show_path\n+    # Destination depends on where match came from: org admin, or user\n+    if params[:organization_id]\n+      @org = Organization.friendly.find(params[:organization_id])\n+      redirect_to organization_recipients_path(@org)\n+    else\n+      flash[:message] = \"Thank you for helping #{recipient.first_name}!\"\n+      redirect_to user_show_path\n+    end\n   end\n+","path":"app/controllers/recipients_controller.rb","position":31,"original_position":31,"commit_id":"1599ceebd33447142a590b148e2b587be65c40b8","original_commit_id":"1599ceebd33447142a590b148e2b587be65c40b8","user":{"login":"atzorvas","id":527550,"avatar_url":"https://avatars.githubusercontent.com/u/527550?v=3","gravatar_id":"","url":"https://api.github.com/users/atzorvas","html_url":"https://github.com/atzorvas","followers_url":"https://api.github.com/users/atzorvas/followers","following_url":"https://api.github.com/users/atzorvas/following{/other_user}","gists_url":"https://api.github.com/users/atzorvas/gists{/gist_id}","starred_url":"https://api.github.com/users/atzorvas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atzorvas/subscriptions","organizations_url":"https://api.github.com/users/atzorvas/orgs","repos_url":"https://api.github.com/users/atzorvas/repos","events_url":"https://api.github.com/users/atzorvas/events{/privacy}","received_events_url":"https://api.github.com/users/atzorvas/received_events","type":"User","site_admin":false},"body":"prefer to clear this empty line","created_at":"2016-08-14T20:32:45Z","updated_at":"2016-08-14T20:32:45Z","html_url":"https://github.com/rubyforgood/share_christmas/pull/138#discussion_r74707952","pull_request_url":"https://api.github.com/repos/rubyforgood/share_christmas/pulls/138","_links":{"self":{"href":"https://api.github.com/repos/rubyforgood/share_christmas/pulls/comments/74707952"},"html":{"href":"https://github.com/rubyforgood/share_christmas/pull/138#discussion_r74707952"},"pull_request":{"href":"https://api.github.com/repos/rubyforgood/share_christmas/pulls/138"}}},"pull_request":{"url":"https://api.github.com/repos/rubyforgood/share_christmas/pulls/138","id":80896842,"html_url":"https://github.com/rubyforgood/share_christmas/pull/138","diff_url":"https://github.com/rubyforgood/share_christmas/pull/138.diff","patch_url":"https://github.com/rubyforgood/share_christmas/pull/138.patch","issue_url":"https://api.github.com/repos/rubyforgood/share_christmas/issues/138","number":138,"state":"open","locked":false,"title":"Add Manual Match Functionality and Tests","user":{"login":"craig-riecke","id":542931,"avatar_url":"https://avatars.githubusercontent.com/u/542931?v=3","gravatar_id":"","url":"https://api.github.com/users/craig-riecke","html_url":"https://github.com/craig-riecke","followers_url":"https://api.github.com/users/craig-riecke/followers","following_url":"https://api.github.com/users/craig-riecke/following{/other_user}","gists_url":"https://api.github.com/users/craig-riecke/gists{/gist_id}","starred_url":"https://api.github.com/users/craig-riecke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craig-riecke/subscriptions","organizations_url":"https://api.github.com/users/craig-riecke/orgs","repos_url":"https://api.github.com/users/craig-riecke/repos","events_url":"https://api.github.com/users/craig-riecke/events{/privacy}","received_events_url":"https://api.github.com/users/craig-riecke/received_events","type":"User","site_admin":false},"body":"Implements #94.","created_at":"2016-08-11T02:26:45Z","updated_at":"2016-08-14T20:32:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"649ae471d77810cc87210b92c055b1da8c7327ad","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/rubyforgood/share_christmas/pulls/138/commits","review_comments_url":"https://api.github.com/repos/rubyforgood/share_christmas/pulls/138/comments","review_comment_url":"https://api.github.com/repos/rubyforgood/share_christmas/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rubyforgood/share_christmas/issues/138/comments","statuses_url":"https://api.github.com/repos/rubyforgood/share_christmas/statuses/1599ceebd33447142a590b148e2b587be65c40b8","head":{"label":"rubyforgood:craigriecke/add_match","ref":"craigriecke/add_match","sha":"1599ceebd33447142a590b148e2b587be65c40b8","user":{"login":"rubyforgood","id":11573263,"avatar_url":"https://avatars.githubusercontent.com/u/11573263?v=3","gravatar_id":"","url":"https://api.github.com/users/rubyforgood","html_url":"https://github.com/rubyforgood","followers_url":"https://api.github.com/users/rubyforgood/followers","following_url":"https://api.github.com/users/rubyforgood/following{/other_user}","gists_url":"https://api.github.com/users/rubyforgood/gists{/gist_id}","starred_url":"https://api.github.com/users/rubyforgood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubyforgood/subscriptions","organizations_url":"https://api.github.com/users/rubyforgood/orgs","repos_url":"https://api.github.com/users/rubyforgood/repos","events_url":"https://api.github.com/users/rubyforgood/events{/privacy}","received_events_url":"https://api.github.com/users/rubyforgood/received_events","type":"Organization","site_admin":false},"repo":{"id":56624775,"name":"share_christmas","full_name":"rubyforgood/share_christmas","owner":{"login":"rubyforgood","id":11573263,"avatar_url":"https://avatars.githubusercontent.com/u/11573263?v=3","gravatar_id":"","url":"https://api.github.com/users/rubyforgood","html_url":"https://github.com/rubyforgood","followers_url":"https://api.github.com/users/rubyforgood/followers","following_url":"https://api.github.com/users/rubyforgood/following{/other_user}","gists_url":"https://api.github.com/users/rubyforgood/gists{/gist_id}","starred_url":"https://api.github.com/users/rubyforgood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubyforgood/subscriptions","organizations_url":"https://api.github.com/users/rubyforgood/orgs","repos_url":"https://api.github.com/users/rubyforgood/repos","events_url":"https://api.github.com/users/rubyforgood/events{/privacy}","received_events_url":"https://api.github.com/users/rubyforgood/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rubyforgood/share_christmas","description":"Share Your Holiday Application","fork":false,"url":"https://api.github.com/repos/rubyforgood/share_christmas","forks_url":"https://api.github.com/repos/rubyforgood/share_christmas/forks","keys_url":"https://api.github.com/repos/rubyforgood/share_christmas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rubyforgood/share_christmas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rubyforgood/share_christmas/teams","hooks_url":"https://api.github.com/repos/rubyforgood/share_christmas/hooks","issue_events_url":"https://api.github.com/repos/rubyforgood/share_christmas/issues/events{/number}","events_url":"https://api.github.com/repos/rubyforgood/share_christmas/events","assignees_url":"https://api.github.com/repos/rubyforgood/share_christmas/assignees{/user}","branches_url":"https://api.github.com/repos/rubyforgood/share_christmas/branches{/branch}","tags_url":"https://api.github.com/repos/rubyforgood/share_christmas/tags","blobs_url":"https://api.github.com/repos/rubyforgood/share_christmas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rubyforgood/share_christmas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rubyforgood/share_christmas/git/refs{/sha}","trees_url":"https://api.github.com/repos/rubyforgood/share_christmas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rubyforgood/share_christmas/statuses/{sha}","languages_url":"https://api.github.com/repos/rubyforgood/share_christmas/languages","stargazers_url":"https://api.github.com/repos/rubyforgood/share_christmas/stargazers","contributors_url":"https://api.github.com/repos/rubyforgood/share_christmas/contributors","subscribers_url":"https://api.github.com/repos/rubyforgood/share_christmas/subscribers","subscription_url":"https://api.github.com/repos/rubyforgood/share_christmas/subscription","commits_url":"https://api.github.com/repos/rubyforgood/share_christmas/commits{/sha}","git_commits_url":"https://api.github.com/repos/rubyforgood/share_christmas/git/commits{/sha}","comments_url":"https://api.github.com/repos/rubyforgood/share_christmas/comments{/number}","issue_comment_url":"https://api.github.com/repos/rubyforgood/share_christmas/issues/comments{/number}","contents_url":"https://api.github.com/repos/rubyforgood/share_christmas/contents/{+path}","compare_url":"https://api.github.com/repos/rubyforgood/share_christmas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rubyforgood/share_christmas/merges","archive_url":"https://api.github.com/repos/rubyforgood/share_christmas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rubyforgood/share_christmas/downloads","issues_url":"https://api.github.com/repos/rubyforgood/share_christmas/issues{/number}","pulls_url":"https://api.github.com/repos/rubyforgood/share_christmas/pulls{/number}","milestones_url":"https://api.github.com/repos/rubyforgood/share_christmas/milestones{/number}","notifications_url":"https://api.github.com/repos/rubyforgood/share_christmas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rubyforgood/share_christmas/labels{/name}","releases_url":"https://api.github.com/repos/rubyforgood/share_christmas/releases{/id}","deployments_url":"https://api.github.com/repos/rubyforgood/share_christmas/deployments","created_at":"2016-04-19T19:14:57Z","updated_at":"2016-08-04T11:24:59Z","pushed_at":"2016-08-14T20:23:21Z","git_url":"git://github.com/rubyforgood/share_christmas.git","ssh_url":"git@github.com:rubyforgood/share_christmas.git","clone_url":"https://github.com/rubyforgood/share_christmas.git","svn_url":"https://github.com/rubyforgood/share_christmas","homepage":"","size":491,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":25,"forks":4,"open_issues":25,"watchers":4,"default_branch":"master"}},"base":{"label":"rubyforgood:master","ref":"master","sha":"338786dd1762c5c544139dc4fff8084e50a8f436","user":{"login":"rubyforgood","id":11573263,"avatar_url":"https://avatars.githubusercontent.com/u/11573263?v=3","gravatar_id":"","url":"https://api.github.com/users/rubyforgood","html_url":"https://github.com/rubyforgood","followers_url":"https://api.github.com/users/rubyforgood/followers","following_url":"https://api.github.com/users/rubyforgood/following{/other_user}","gists_url":"https://api.github.com/users/rubyforgood/gists{/gist_id}","starred_url":"https://api.github.com/users/rubyforgood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubyforgood/subscriptions","organizations_url":"https://api.github.com/users/rubyforgood/orgs","repos_url":"https://api.github.com/users/rubyforgood/repos","events_url":"https://api.github.com/users/rubyforgood/events{/privacy}","received_events_url":"https://api.github.com/users/rubyforgood/received_events","type":"Organization","site_admin":false},"repo":{"id":56624775,"name":"share_christmas","full_name":"rubyforgood/share_christmas","owner":{"login":"rubyforgood","id":11573263,"avatar_url":"https://avatars.githubusercontent.com/u/11573263?v=3","gravatar_id":"","url":"https://api.github.com/users/rubyforgood","html_url":"https://github.com/rubyforgood","followers_url":"https://api.github.com/users/rubyforgood/followers","following_url":"https://api.github.com/users/rubyforgood/following{/other_user}","gists_url":"https://api.github.com/users/rubyforgood/gists{/gist_id}","starred_url":"https://api.github.com/users/rubyforgood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubyforgood/subscriptions","organizations_url":"https://api.github.com/users/rubyforgood/orgs","repos_url":"https://api.github.com/users/rubyforgood/repos","events_url":"https://api.github.com/users/rubyforgood/events{/privacy}","received_events_url":"https://api.github.com/users/rubyforgood/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rubyforgood/share_christmas","description":"Share Your Holiday Application","fork":false,"url":"https://api.github.com/repos/rubyforgood/share_christmas","forks_url":"https://api.github.com/repos/rubyforgood/share_christmas/forks","keys_url":"https://api.github.com/repos/rubyforgood/share_christmas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rubyforgood/share_christmas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rubyforgood/share_christmas/teams","hooks_url":"https://api.github.com/repos/rubyforgood/share_christmas/hooks","issue_events_url":"https://api.github.com/repos/rubyforgood/share_christmas/issues/events{/number}","events_url":"https://api.github.com/repos/rubyforgood/share_christmas/events","assignees_url":"https://api.github.com/repos/rubyforgood/share_christmas/assignees{/user}","branches_url":"https://api.github.com/repos/rubyforgood/share_christmas/branches{/branch}","tags_url":"https://api.github.com/repos/rubyforgood/share_christmas/tags","blobs_url":"https://api.github.com/repos/rubyforgood/share_christmas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rubyforgood/share_christmas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rubyforgood/share_christmas/git/refs{/sha}","trees_url":"https://api.github.com/repos/rubyforgood/share_christmas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rubyforgood/share_christmas/statuses/{sha}","languages_url":"https://api.github.com/repos/rubyforgood/share_christmas/languages","stargazers_url":"https://api.github.com/repos/rubyforgood/share_christmas/stargazers","contributors_url":"https://api.github.com/repos/rubyforgood/share_christmas/contributors","subscribers_url":"https://api.github.com/repos/rubyforgood/share_christmas/subscribers","subscription_url":"https://api.github.com/repos/rubyforgood/share_christmas/subscription","commits_url":"https://api.github.com/repos/rubyforgood/share_christmas/commits{/sha}","git_commits_url":"https://api.github.com/repos/rubyforgood/share_christmas/git/commits{/sha}","comments_url":"https://api.github.com/repos/rubyforgood/share_christmas/comments{/number}","issue_comment_url":"https://api.github.com/repos/rubyforgood/share_christmas/issues/comments{/number}","contents_url":"https://api.github.com/repos/rubyforgood/share_christmas/contents/{+path}","compare_url":"https://api.github.com/repos/rubyforgood/share_christmas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rubyforgood/share_christmas/merges","archive_url":"https://api.github.com/repos/rubyforgood/share_christmas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rubyforgood/share_christmas/downloads","issues_url":"https://api.github.com/repos/rubyforgood/share_christmas/issues{/number}","pulls_url":"https://api.github.com/repos/rubyforgood/share_christmas/pulls{/number}","milestones_url":"https://api.github.com/repos/rubyforgood/share_christmas/milestones{/number}","notifications_url":"https://api.github.com/repos/rubyforgood/share_christmas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rubyforgood/share_christmas/labels{/name}","releases_url":"https://api.github.com/repos/rubyforgood/share_christmas/releases{/id}","deployments_url":"https://api.github.com/repos/rubyforgood/share_christmas/deployments","created_at":"2016-04-19T19:14:57Z","updated_at":"2016-08-04T11:24:59Z","pushed_at":"2016-08-14T20:23:21Z","git_url":"git://github.com/rubyforgood/share_christmas.git","ssh_url":"git@github.com:rubyforgood/share_christmas.git","clone_url":"https://github.com/rubyforgood/share_christmas.git","svn_url":"https://github.com/rubyforgood/share_christmas","homepage":"","size":491,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":25,"forks":4,"open_issues":25,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rubyforgood/share_christmas/pulls/138"},"html":{"href":"https://github.com/rubyforgood/share_christmas/pull/138"},"issue":{"href":"https://api.github.com/repos/rubyforgood/share_christmas/issues/138"},"comments":{"href":"https://api.github.com/repos/rubyforgood/share_christmas/issues/138/comments"},"review_comments":{"href":"https://api.github.com/repos/rubyforgood/share_christmas/pulls/138/comments"},"review_comment":{"href":"https://api.github.com/repos/rubyforgood/share_christmas/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rubyforgood/share_christmas/pulls/138/commits"},"statuses":{"href":"https://api.github.com/repos/rubyforgood/share_christmas/statuses/1599ceebd33447142a590b148e2b587be65c40b8"}}}}
{"actor":{"display_login":"atzorvas"}}