{"action":"created","comment":{"url":"https://api.github.com/repos/elreyatee/myflix/pulls/comments/37228507","id":37228507,"diff_hunk":"@@ -0,0 +1,28 @@\n+class RelationshipsController < ApplicationController\n+  before_action :require_user, only: [:create, :destroy, :index]\n+\n+  def index\n+    @followings = current_user.followings\n+  end\n+\n+  def create\n+    @relationship = current_user.relationships.create(following_id: params[:following_id])\n+\n+    if @relationship.errors.any?\n+      @relationship.errors.messages.values.each do |msg|\n+        flash[:error] = \"#{msg.first}\"\n+        redirect_to :back\n+      end\n+    else\n+      flash[:notice] = \"You are now following #{User.find(@relationship.following_id).name}\"","path":"app/controllers/relationships_controller.rb","position":17,"original_position":17,"commit_id":"e1d0e63c345579ea0cae332fe303c5fc8e6eb820","original_commit_id":"e1d0e63c345579ea0cae332fe303c5fc8e6eb820","user":{"login":"elreyatee","id":6336529,"avatar_url":"https://avatars.githubusercontent.com/u/6336529?v=3","gravatar_id":"","url":"https://api.github.com/users/elreyatee","html_url":"https://github.com/elreyatee","followers_url":"https://api.github.com/users/elreyatee/followers","following_url":"https://api.github.com/users/elreyatee/following{/other_user}","gists_url":"https://api.github.com/users/elreyatee/gists{/gist_id}","starred_url":"https://api.github.com/users/elreyatee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elreyatee/subscriptions","organizations_url":"https://api.github.com/users/elreyatee/orgs","repos_url":"https://api.github.com/users/elreyatee/repos","events_url":"https://api.github.com/users/elreyatee/events{/privacy}","received_events_url":"https://api.github.com/users/elreyatee/received_events","type":"User","site_admin":false},"body":"Good suggestion, I mad the change. That string was knarly looking","created_at":"2015-08-17T19:46:54Z","updated_at":"2015-08-17T19:46:54Z","html_url":"https://github.com/elreyatee/myflix/pull/7#discussion_r37228507","pull_request_url":"https://api.github.com/repos/elreyatee/myflix/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/elreyatee/myflix/pulls/comments/37228507"},"html":{"href":"https://github.com/elreyatee/myflix/pull/7#discussion_r37228507"},"pull_request":{"href":"https://api.github.com/repos/elreyatee/myflix/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/elreyatee/myflix/pulls/7","id":42615120,"html_url":"https://github.com/elreyatee/myflix/pull/7","diff_url":"https://github.com/elreyatee/myflix/pull/7.diff","patch_url":"https://github.com/elreyatee/myflix/pull/7.patch","issue_url":"https://api.github.com/repos/elreyatee/myflix/issues/7","number":7,"state":"open","locked":false,"title":"Follow unfollow users","user":{"login":"elreyatee","id":6336529,"avatar_url":"https://avatars.githubusercontent.com/u/6336529?v=3","gravatar_id":"","url":"https://api.github.com/users/elreyatee","html_url":"https://github.com/elreyatee","followers_url":"https://api.github.com/users/elreyatee/followers","following_url":"https://api.github.com/users/elreyatee/following{/other_user}","gists_url":"https://api.github.com/users/elreyatee/gists{/gist_id}","starred_url":"https://api.github.com/users/elreyatee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elreyatee/subscriptions","organizations_url":"https://api.github.com/users/elreyatee/orgs","repos_url":"https://api.github.com/users/elreyatee/repos","events_url":"https://api.github.com/users/elreyatee/events{/privacy}","received_events_url":"https://api.github.com/users/elreyatee/received_events","type":"User","site_admin":false},"body":"Sorry, I realized after the fact that I implemented the Follow/Unfollow features and pushed them to my master branch! I still made added a few more features like restricting users to one review per video, etc. Please take a look and I appreciate your feedback.","created_at":"2015-08-17T17:52:58Z","updated_at":"2015-08-17T19:46:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ebb41512254cdbdf9623d9b8638a00694656db94","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/elreyatee/myflix/pulls/7/commits","review_comments_url":"https://api.github.com/repos/elreyatee/myflix/pulls/7/comments","review_comment_url":"https://api.github.com/repos/elreyatee/myflix/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elreyatee/myflix/issues/7/comments","statuses_url":"https://api.github.com/repos/elreyatee/myflix/statuses/e1d0e63c345579ea0cae332fe303c5fc8e6eb820","head":{"label":"elreyatee:follow_unfollow_users","ref":"follow_unfollow_users","sha":"e1d0e63c345579ea0cae332fe303c5fc8e6eb820","user":{"login":"elreyatee","id":6336529,"avatar_url":"https://avatars.githubusercontent.com/u/6336529?v=3","gravatar_id":"","url":"https://api.github.com/users/elreyatee","html_url":"https://github.com/elreyatee","followers_url":"https://api.github.com/users/elreyatee/followers","following_url":"https://api.github.com/users/elreyatee/following{/other_user}","gists_url":"https://api.github.com/users/elreyatee/gists{/gist_id}","starred_url":"https://api.github.com/users/elreyatee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elreyatee/subscriptions","organizations_url":"https://api.github.com/users/elreyatee/orgs","repos_url":"https://api.github.com/users/elreyatee/repos","events_url":"https://api.github.com/users/elreyatee/events{/privacy}","received_events_url":"https://api.github.com/users/elreyatee/received_events","type":"User","site_admin":false},"repo":{"id":36109776,"name":"myflix","full_name":"elreyatee/myflix","owner":{"login":"elreyatee","id":6336529,"avatar_url":"https://avatars.githubusercontent.com/u/6336529?v=3","gravatar_id":"","url":"https://api.github.com/users/elreyatee","html_url":"https://github.com/elreyatee","followers_url":"https://api.github.com/users/elreyatee/followers","following_url":"https://api.github.com/users/elreyatee/following{/other_user}","gists_url":"https://api.github.com/users/elreyatee/gists{/gist_id}","starred_url":"https://api.github.com/users/elreyatee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elreyatee/subscriptions","organizations_url":"https://api.github.com/users/elreyatee/orgs","repos_url":"https://api.github.com/users/elreyatee/repos","events_url":"https://api.github.com/users/elreyatee/events{/privacy}","received_events_url":"https://api.github.com/users/elreyatee/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/elreyatee/myflix","description":"","fork":false,"url":"https://api.github.com/repos/elreyatee/myflix","forks_url":"https://api.github.com/repos/elreyatee/myflix/forks","keys_url":"https://api.github.com/repos/elreyatee/myflix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elreyatee/myflix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elreyatee/myflix/teams","hooks_url":"https://api.github.com/repos/elreyatee/myflix/hooks","issue_events_url":"https://api.github.com/repos/elreyatee/myflix/issues/events{/number}","events_url":"https://api.github.com/repos/elreyatee/myflix/events","assignees_url":"https://api.github.com/repos/elreyatee/myflix/assignees{/user}","branches_url":"https://api.github.com/repos/elreyatee/myflix/branches{/branch}","tags_url":"https://api.github.com/repos/elreyatee/myflix/tags","blobs_url":"https://api.github.com/repos/elreyatee/myflix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elreyatee/myflix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elreyatee/myflix/git/refs{/sha}","trees_url":"https://api.github.com/repos/elreyatee/myflix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elreyatee/myflix/statuses/{sha}","languages_url":"https://api.github.com/repos/elreyatee/myflix/languages","stargazers_url":"https://api.github.com/repos/elreyatee/myflix/stargazers","contributors_url":"https://api.github.com/repos/elreyatee/myflix/contributors","subscribers_url":"https://api.github.com/repos/elreyatee/myflix/subscribers","subscription_url":"https://api.github.com/repos/elreyatee/myflix/subscription","commits_url":"https://api.github.com/repos/elreyatee/myflix/commits{/sha}","git_commits_url":"https://api.github.com/repos/elreyatee/myflix/git/commits{/sha}","comments_url":"https://api.github.com/repos/elreyatee/myflix/comments{/number}","issue_comment_url":"https://api.github.com/repos/elreyatee/myflix/issues/comments{/number}","contents_url":"https://api.github.com/repos/elreyatee/myflix/contents/{+path}","compare_url":"https://api.github.com/repos/elreyatee/myflix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elreyatee/myflix/merges","archive_url":"https://api.github.com/repos/elreyatee/myflix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elreyatee/myflix/downloads","issues_url":"https://api.github.com/repos/elreyatee/myflix/issues{/number}","pulls_url":"https://api.github.com/repos/elreyatee/myflix/pulls{/number}","milestones_url":"https://api.github.com/repos/elreyatee/myflix/milestones{/number}","notifications_url":"https://api.github.com/repos/elreyatee/myflix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elreyatee/myflix/labels{/name}","releases_url":"https://api.github.com/repos/elreyatee/myflix/releases{/id}","created_at":"2015-05-23T06:19:44Z","updated_at":"2015-06-02T04:54:23Z","pushed_at":"2015-08-17T17:52:58Z","git_url":"git://github.com/elreyatee/myflix.git","ssh_url":"git@github.com:elreyatee/myflix.git","clone_url":"https://github.com/elreyatee/myflix.git","svn_url":"https://github.com/elreyatee/myflix","homepage":null,"size":2948,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"elreyatee:master","ref":"master","sha":"47088434277abce4cadb4e7abc87f15437d61965","user":{"login":"elreyatee","id":6336529,"avatar_url":"https://avatars.githubusercontent.com/u/6336529?v=3","gravatar_id":"","url":"https://api.github.com/users/elreyatee","html_url":"https://github.com/elreyatee","followers_url":"https://api.github.com/users/elreyatee/followers","following_url":"https://api.github.com/users/elreyatee/following{/other_user}","gists_url":"https://api.github.com/users/elreyatee/gists{/gist_id}","starred_url":"https://api.github.com/users/elreyatee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elreyatee/subscriptions","organizations_url":"https://api.github.com/users/elreyatee/orgs","repos_url":"https://api.github.com/users/elreyatee/repos","events_url":"https://api.github.com/users/elreyatee/events{/privacy}","received_events_url":"https://api.github.com/users/elreyatee/received_events","type":"User","site_admin":false},"repo":{"id":36109776,"name":"myflix","full_name":"elreyatee/myflix","owner":{"login":"elreyatee","id":6336529,"avatar_url":"https://avatars.githubusercontent.com/u/6336529?v=3","gravatar_id":"","url":"https://api.github.com/users/elreyatee","html_url":"https://github.com/elreyatee","followers_url":"https://api.github.com/users/elreyatee/followers","following_url":"https://api.github.com/users/elreyatee/following{/other_user}","gists_url":"https://api.github.com/users/elreyatee/gists{/gist_id}","starred_url":"https://api.github.com/users/elreyatee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elreyatee/subscriptions","organizations_url":"https://api.github.com/users/elreyatee/orgs","repos_url":"https://api.github.com/users/elreyatee/repos","events_url":"https://api.github.com/users/elreyatee/events{/privacy}","received_events_url":"https://api.github.com/users/elreyatee/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/elreyatee/myflix","description":"","fork":false,"url":"https://api.github.com/repos/elreyatee/myflix","forks_url":"https://api.github.com/repos/elreyatee/myflix/forks","keys_url":"https://api.github.com/repos/elreyatee/myflix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elreyatee/myflix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elreyatee/myflix/teams","hooks_url":"https://api.github.com/repos/elreyatee/myflix/hooks","issue_events_url":"https://api.github.com/repos/elreyatee/myflix/issues/events{/number}","events_url":"https://api.github.com/repos/elreyatee/myflix/events","assignees_url":"https://api.github.com/repos/elreyatee/myflix/assignees{/user}","branches_url":"https://api.github.com/repos/elreyatee/myflix/branches{/branch}","tags_url":"https://api.github.com/repos/elreyatee/myflix/tags","blobs_url":"https://api.github.com/repos/elreyatee/myflix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elreyatee/myflix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elreyatee/myflix/git/refs{/sha}","trees_url":"https://api.github.com/repos/elreyatee/myflix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elreyatee/myflix/statuses/{sha}","languages_url":"https://api.github.com/repos/elreyatee/myflix/languages","stargazers_url":"https://api.github.com/repos/elreyatee/myflix/stargazers","contributors_url":"https://api.github.com/repos/elreyatee/myflix/contributors","subscribers_url":"https://api.github.com/repos/elreyatee/myflix/subscribers","subscription_url":"https://api.github.com/repos/elreyatee/myflix/subscription","commits_url":"https://api.github.com/repos/elreyatee/myflix/commits{/sha}","git_commits_url":"https://api.github.com/repos/elreyatee/myflix/git/commits{/sha}","comments_url":"https://api.github.com/repos/elreyatee/myflix/comments{/number}","issue_comment_url":"https://api.github.com/repos/elreyatee/myflix/issues/comments{/number}","contents_url":"https://api.github.com/repos/elreyatee/myflix/contents/{+path}","compare_url":"https://api.github.com/repos/elreyatee/myflix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elreyatee/myflix/merges","archive_url":"https://api.github.com/repos/elreyatee/myflix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elreyatee/myflix/downloads","issues_url":"https://api.github.com/repos/elreyatee/myflix/issues{/number}","pulls_url":"https://api.github.com/repos/elreyatee/myflix/pulls{/number}","milestones_url":"https://api.github.com/repos/elreyatee/myflix/milestones{/number}","notifications_url":"https://api.github.com/repos/elreyatee/myflix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elreyatee/myflix/labels{/name}","releases_url":"https://api.github.com/repos/elreyatee/myflix/releases{/id}","created_at":"2015-05-23T06:19:44Z","updated_at":"2015-06-02T04:54:23Z","pushed_at":"2015-08-17T17:52:58Z","git_url":"git://github.com/elreyatee/myflix.git","ssh_url":"git@github.com:elreyatee/myflix.git","clone_url":"https://github.com/elreyatee/myflix.git","svn_url":"https://github.com/elreyatee/myflix","homepage":null,"size":2948,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elreyatee/myflix/pulls/7"},"html":{"href":"https://github.com/elreyatee/myflix/pull/7"},"issue":{"href":"https://api.github.com/repos/elreyatee/myflix/issues/7"},"comments":{"href":"https://api.github.com/repos/elreyatee/myflix/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/elreyatee/myflix/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/elreyatee/myflix/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elreyatee/myflix/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/elreyatee/myflix/statuses/e1d0e63c345579ea0cae332fe303c5fc8e6eb820"}}}}