{"action":"created","comment":{"url":"https://api.github.com/repos/dshcheung/recipedb.me/pulls/comments/24148834","id":24148834,"diff_hunk":"@@ -3,7 +3,19 @@ def any\n     render json: {signedIn: user_signed_in?, username: get_username, user_id: current_user.id}\n   end\n \n-  def bookmarks\n+  def add_bookmark\n+    bookmark = current_user.user_bookmarks.new\n+    bookmark.recipe_id = params[:recipe_id]\n+    if bookmark.save\n+      render json: {success: true}\n+    else\n+      render json: {success: false}\n+    end\n+  end\n+\n+  def remove_bookmark\n+    bookmark = current_user.user_bookmarks.where(recipe_id: params[:recipe_id])","path":"app/controllers/users_controller.rb","position":null,"original_position":16,"commit_id":"3a735c396d4155e81f892e7d95801eb4eb7a5f16","original_commit_id":"82fb2117e34e29b954f293edc589ae841c31b1af","user":{"login":"cchchoi1986","id":9435816,"avatar_url":"https://avatars.githubusercontent.com/u/9435816?v=3","gravatar_id":"","url":"https://api.github.com/users/cchchoi1986","html_url":"https://github.com/cchchoi1986","followers_url":"https://api.github.com/users/cchchoi1986/followers","following_url":"https://api.github.com/users/cchchoi1986/following{/other_user}","gists_url":"https://api.github.com/users/cchchoi1986/gists{/gist_id}","starred_url":"https://api.github.com/users/cchchoi1986/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cchchoi1986/subscriptions","organizations_url":"https://api.github.com/users/cchchoi1986/orgs","repos_url":"https://api.github.com/users/cchchoi1986/repos","events_url":"https://api.github.com/users/cchchoi1986/events{/privacy}","received_events_url":"https://api.github.com/users/cchchoi1986/received_events","type":"User","site_admin":false},"body":"done","created_at":"2015-02-05T08:22:33Z","updated_at":"2015-02-05T08:22:33Z","html_url":"https://github.com/dshcheung/recipedb.me/pull/118#discussion_r24148834","pull_request_url":"https://api.github.com/repos/dshcheung/recipedb.me/pulls/118","_links":{"self":{"href":"https://api.github.com/repos/dshcheung/recipedb.me/pulls/comments/24148834"},"html":{"href":"https://github.com/dshcheung/recipedb.me/pull/118#discussion_r24148834"},"pull_request":{"href":"https://api.github.com/repos/dshcheung/recipedb.me/pulls/118"}}},"pull_request":{"url":"https://api.github.com/repos/dshcheung/recipedb.me/pulls/118","id":28701279,"html_url":"https://github.com/dshcheung/recipedb.me/pull/118","diff_url":"https://github.com/dshcheung/recipedb.me/pull/118.diff","patch_url":"https://github.com/dshcheung/recipedb.me/pull/118.patch","issue_url":"https://api.github.com/repos/dshcheung/recipedb.me/issues/118","number":118,"state":"open","locked":false,"title":"installed noty and did ng-click to post bookmarks","user":{"login":"cchchoi1986","id":9435816,"avatar_url":"https://avatars.githubusercontent.com/u/9435816?v=3","gravatar_id":"","url":"https://api.github.com/users/cchchoi1986","html_url":"https://github.com/cchchoi1986","followers_url":"https://api.github.com/users/cchchoi1986/followers","following_url":"https://api.github.com/users/cchchoi1986/following{/other_user}","gists_url":"https://api.github.com/users/cchchoi1986/gists{/gist_id}","starred_url":"https://api.github.com/users/cchchoi1986/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cchchoi1986/subscriptions","organizations_url":"https://api.github.com/users/cchchoi1986/orgs","repos_url":"https://api.github.com/users/cchchoi1986/repos","events_url":"https://api.github.com/users/cchchoi1986/events{/privacy}","received_events_url":"https://api.github.com/users/cchchoi1986/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-02-05T06:00:55Z","updated_at":"2015-02-05T08:22:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6f49e087f71c72a0121085175222e4770b4b633e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dshcheung/recipedb.me/pulls/118/commits","review_comments_url":"https://api.github.com/repos/dshcheung/recipedb.me/pulls/118/comments","review_comment_url":"https://api.github.com/repos/dshcheung/recipedb.me/pulls/comments/{number}","comments_url":"https://api.github.com/repos/dshcheung/recipedb.me/issues/118/comments","statuses_url":"https://api.github.com/repos/dshcheung/recipedb.me/statuses/3a735c396d4155e81f892e7d95801eb4eb7a5f16","head":{"label":"dshcheung:front-end/bookmark-initial","ref":"front-end/bookmark-initial","sha":"3a735c396d4155e81f892e7d95801eb4eb7a5f16","user":{"login":"dshcheung","id":9794559,"avatar_url":"https://avatars.githubusercontent.com/u/9794559?v=3","gravatar_id":"","url":"https://api.github.com/users/dshcheung","html_url":"https://github.com/dshcheung","followers_url":"https://api.github.com/users/dshcheung/followers","following_url":"https://api.github.com/users/dshcheung/following{/other_user}","gists_url":"https://api.github.com/users/dshcheung/gists{/gist_id}","starred_url":"https://api.github.com/users/dshcheung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dshcheung/subscriptions","organizations_url":"https://api.github.com/users/dshcheung/orgs","repos_url":"https://api.github.com/users/dshcheung/repos","events_url":"https://api.github.com/users/dshcheung/events{/privacy}","received_events_url":"https://api.github.com/users/dshcheung/received_events","type":"User","site_admin":false},"repo":{"id":29573099,"name":"recipedb.me","full_name":"dshcheung/recipedb.me","owner":{"login":"dshcheung","id":9794559,"avatar_url":"https://avatars.githubusercontent.com/u/9794559?v=3","gravatar_id":"","url":"https://api.github.com/users/dshcheung","html_url":"https://github.com/dshcheung","followers_url":"https://api.github.com/users/dshcheung/followers","following_url":"https://api.github.com/users/dshcheung/following{/other_user}","gists_url":"https://api.github.com/users/dshcheung/gists{/gist_id}","starred_url":"https://api.github.com/users/dshcheung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dshcheung/subscriptions","organizations_url":"https://api.github.com/users/dshcheung/orgs","repos_url":"https://api.github.com/users/dshcheung/repos","events_url":"https://api.github.com/users/dshcheung/events{/privacy}","received_events_url":"https://api.github.com/users/dshcheung/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dshcheung/recipedb.me","description":"","fork":false,"url":"https://api.github.com/repos/dshcheung/recipedb.me","forks_url":"https://api.github.com/repos/dshcheung/recipedb.me/forks","keys_url":"https://api.github.com/repos/dshcheung/recipedb.me/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dshcheung/recipedb.me/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dshcheung/recipedb.me/teams","hooks_url":"https://api.github.com/repos/dshcheung/recipedb.me/hooks","issue_events_url":"https://api.github.com/repos/dshcheung/recipedb.me/issues/events{/number}","events_url":"https://api.github.com/repos/dshcheung/recipedb.me/events","assignees_url":"https://api.github.com/repos/dshcheung/recipedb.me/assignees{/user}","branches_url":"https://api.github.com/repos/dshcheung/recipedb.me/branches{/branch}","tags_url":"https://api.github.com/repos/dshcheung/recipedb.me/tags","blobs_url":"https://api.github.com/repos/dshcheung/recipedb.me/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dshcheung/recipedb.me/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dshcheung/recipedb.me/git/refs{/sha}","trees_url":"https://api.github.com/repos/dshcheung/recipedb.me/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dshcheung/recipedb.me/statuses/{sha}","languages_url":"https://api.github.com/repos/dshcheung/recipedb.me/languages","stargazers_url":"https://api.github.com/repos/dshcheung/recipedb.me/stargazers","contributors_url":"https://api.github.com/repos/dshcheung/recipedb.me/contributors","subscribers_url":"https://api.github.com/repos/dshcheung/recipedb.me/subscribers","subscription_url":"https://api.github.com/repos/dshcheung/recipedb.me/subscription","commits_url":"https://api.github.com/repos/dshcheung/recipedb.me/commits{/sha}","git_commits_url":"https://api.github.com/repos/dshcheung/recipedb.me/git/commits{/sha}","comments_url":"https://api.github.com/repos/dshcheung/recipedb.me/comments{/number}","issue_comment_url":"https://api.github.com/repos/dshcheung/recipedb.me/issues/comments/{number}","contents_url":"https://api.github.com/repos/dshcheung/recipedb.me/contents/{+path}","compare_url":"https://api.github.com/repos/dshcheung/recipedb.me/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dshcheung/recipedb.me/merges","archive_url":"https://api.github.com/repos/dshcheung/recipedb.me/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dshcheung/recipedb.me/downloads","issues_url":"https://api.github.com/repos/dshcheung/recipedb.me/issues{/number}","pulls_url":"https://api.github.com/repos/dshcheung/recipedb.me/pulls{/number}","milestones_url":"https://api.github.com/repos/dshcheung/recipedb.me/milestones{/number}","notifications_url":"https://api.github.com/repos/dshcheung/recipedb.me/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dshcheung/recipedb.me/labels{/name}","releases_url":"https://api.github.com/repos/dshcheung/recipedb.me/releases{/id}","created_at":"2015-01-21T05:26:40Z","updated_at":"2015-02-05T06:52:00Z","pushed_at":"2015-02-05T08:20:14Z","git_url":"git://github.com/dshcheung/recipedb.me.git","ssh_url":"git@github.com:dshcheung/recipedb.me.git","clone_url":"https://github.com/dshcheung/recipedb.me.git","svn_url":"https://github.com/dshcheung/recipedb.me","homepage":null,"size":4204,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":17,"forks":0,"open_issues":17,"watchers":0,"default_branch":"master"}},"base":{"label":"dshcheung:master","ref":"master","sha":"5912129dd286e8bc5bc4f9c4df10fbaea2d7a187","user":{"login":"dshcheung","id":9794559,"avatar_url":"https://avatars.githubusercontent.com/u/9794559?v=3","gravatar_id":"","url":"https://api.github.com/users/dshcheung","html_url":"https://github.com/dshcheung","followers_url":"https://api.github.com/users/dshcheung/followers","following_url":"https://api.github.com/users/dshcheung/following{/other_user}","gists_url":"https://api.github.com/users/dshcheung/gists{/gist_id}","starred_url":"https://api.github.com/users/dshcheung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dshcheung/subscriptions","organizations_url":"https://api.github.com/users/dshcheung/orgs","repos_url":"https://api.github.com/users/dshcheung/repos","events_url":"https://api.github.com/users/dshcheung/events{/privacy}","received_events_url":"https://api.github.com/users/dshcheung/received_events","type":"User","site_admin":false},"repo":{"id":29573099,"name":"recipedb.me","full_name":"dshcheung/recipedb.me","owner":{"login":"dshcheung","id":9794559,"avatar_url":"https://avatars.githubusercontent.com/u/9794559?v=3","gravatar_id":"","url":"https://api.github.com/users/dshcheung","html_url":"https://github.com/dshcheung","followers_url":"https://api.github.com/users/dshcheung/followers","following_url":"https://api.github.com/users/dshcheung/following{/other_user}","gists_url":"https://api.github.com/users/dshcheung/gists{/gist_id}","starred_url":"https://api.github.com/users/dshcheung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dshcheung/subscriptions","organizations_url":"https://api.github.com/users/dshcheung/orgs","repos_url":"https://api.github.com/users/dshcheung/repos","events_url":"https://api.github.com/users/dshcheung/events{/privacy}","received_events_url":"https://api.github.com/users/dshcheung/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dshcheung/recipedb.me","description":"","fork":false,"url":"https://api.github.com/repos/dshcheung/recipedb.me","forks_url":"https://api.github.com/repos/dshcheung/recipedb.me/forks","keys_url":"https://api.github.com/repos/dshcheung/recipedb.me/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dshcheung/recipedb.me/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dshcheung/recipedb.me/teams","hooks_url":"https://api.github.com/repos/dshcheung/recipedb.me/hooks","issue_events_url":"https://api.github.com/repos/dshcheung/recipedb.me/issues/events{/number}","events_url":"https://api.github.com/repos/dshcheung/recipedb.me/events","assignees_url":"https://api.github.com/repos/dshcheung/recipedb.me/assignees{/user}","branches_url":"https://api.github.com/repos/dshcheung/recipedb.me/branches{/branch}","tags_url":"https://api.github.com/repos/dshcheung/recipedb.me/tags","blobs_url":"https://api.github.com/repos/dshcheung/recipedb.me/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dshcheung/recipedb.me/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dshcheung/recipedb.me/git/refs{/sha}","trees_url":"https://api.github.com/repos/dshcheung/recipedb.me/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dshcheung/recipedb.me/statuses/{sha}","languages_url":"https://api.github.com/repos/dshcheung/recipedb.me/languages","stargazers_url":"https://api.github.com/repos/dshcheung/recipedb.me/stargazers","contributors_url":"https://api.github.com/repos/dshcheung/recipedb.me/contributors","subscribers_url":"https://api.github.com/repos/dshcheung/recipedb.me/subscribers","subscription_url":"https://api.github.com/repos/dshcheung/recipedb.me/subscription","commits_url":"https://api.github.com/repos/dshcheung/recipedb.me/commits{/sha}","git_commits_url":"https://api.github.com/repos/dshcheung/recipedb.me/git/commits{/sha}","comments_url":"https://api.github.com/repos/dshcheung/recipedb.me/comments{/number}","issue_comment_url":"https://api.github.com/repos/dshcheung/recipedb.me/issues/comments/{number}","contents_url":"https://api.github.com/repos/dshcheung/recipedb.me/contents/{+path}","compare_url":"https://api.github.com/repos/dshcheung/recipedb.me/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dshcheung/recipedb.me/merges","archive_url":"https://api.github.com/repos/dshcheung/recipedb.me/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dshcheung/recipedb.me/downloads","issues_url":"https://api.github.com/repos/dshcheung/recipedb.me/issues{/number}","pulls_url":"https://api.github.com/repos/dshcheung/recipedb.me/pulls{/number}","milestones_url":"https://api.github.com/repos/dshcheung/recipedb.me/milestones{/number}","notifications_url":"https://api.github.com/repos/dshcheung/recipedb.me/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dshcheung/recipedb.me/labels{/name}","releases_url":"https://api.github.com/repos/dshcheung/recipedb.me/releases{/id}","created_at":"2015-01-21T05:26:40Z","updated_at":"2015-02-05T06:52:00Z","pushed_at":"2015-02-05T08:20:14Z","git_url":"git://github.com/dshcheung/recipedb.me.git","ssh_url":"git@github.com:dshcheung/recipedb.me.git","clone_url":"https://github.com/dshcheung/recipedb.me.git","svn_url":"https://github.com/dshcheung/recipedb.me","homepage":null,"size":4204,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":17,"forks":0,"open_issues":17,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dshcheung/recipedb.me/pulls/118"},"html":{"href":"https://github.com/dshcheung/recipedb.me/pull/118"},"issue":{"href":"https://api.github.com/repos/dshcheung/recipedb.me/issues/118"},"comments":{"href":"https://api.github.com/repos/dshcheung/recipedb.me/issues/118/comments"},"review_comments":{"href":"https://api.github.com/repos/dshcheung/recipedb.me/pulls/118/comments"},"review_comment":{"href":"https://api.github.com/repos/dshcheung/recipedb.me/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/dshcheung/recipedb.me/pulls/118/commits"},"statuses":{"href":"https://api.github.com/repos/dshcheung/recipedb.me/statuses/3a735c396d4155e81f892e7d95801eb4eb7a5f16"}}}}