{"action":"created","comment":{"url":"https://api.github.com/repos/cuappdev/eatery-backend/pulls/comments/59969774","id":59969774,"diff_hunk":"@@ -0,0 +1,56 @@\n+# == Schema Information\n+#\n+# Table name: events\n+#\n+#  id          :integer          not null, primary key\n+#  user_id \t\t :integer \t\t\t\t \n+#  title \t\t\t :string \t\t\t\t\t not null, can be blank, 5-15 characters \n+#  active \t\t :boolean\t\t\t\t\t \n+#  created_at  :datetime\t\t\t\t not null\n+#  updated_at  :datetime \t\t\t\t not null \n+\n+require 'json'\n+\n+class Api::V1::EventsController < Api::V1::ApplicationController\n+\tbefore_action :authorize, only: [:index, :create, :destroy] \n+\n+\n+\tdef index \n+\t\t# Find the events of this user\n+\t\t@events = Event.where(user_id: @user.id) \n+\t\trender json: { events: @events.map { |event| event.as_json }}\n+\tend \n+\n+\t# Works \n+\tdef create \n+\t\t@event = Event.create(user_id: @user.id, title: event_params[:title])  \n+\t\tif @event.valid? \n+\t\t\trender json: { success: true, event: @event }\n+\t\telse\n+\t\t\trender json: { success: false }\n+\t\tend\n+\tend \n+\n+\n+\tdef update ","path":"app/controllers/api/v1/events_controller.rb","position":35,"original_position":35,"commit_id":"9b00c6aabff1598bb56530c305b56bfdf0b0af8d","original_commit_id":"9b00c6aabff1598bb56530c305b56bfdf0b0af8d","user":{"login":"ifilonenko","id":4926714,"avatar_url":"https://avatars.githubusercontent.com/u/4926714?v=3","gravatar_id":"","url":"https://api.github.com/users/ifilonenko","html_url":"https://github.com/ifilonenko","followers_url":"https://api.github.com/users/ifilonenko/followers","following_url":"https://api.github.com/users/ifilonenko/following{/other_user}","gists_url":"https://api.github.com/users/ifilonenko/gists{/gist_id}","starred_url":"https://api.github.com/users/ifilonenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ifilonenko/subscriptions","organizations_url":"https://api.github.com/users/ifilonenko/orgs","repos_url":"https://api.github.com/users/ifilonenko/repos","events_url":"https://api.github.com/users/ifilonenko/events{/privacy}","received_events_url":"https://api.github.com/users/ifilonenko/received_events","type":"User","site_admin":false},"body":"Implement ","created_at":"2016-04-16T16:16:25Z","updated_at":"2016-04-16T16:16:25Z","html_url":"https://github.com/cuappdev/eatery-backend/pull/15#discussion_r59969774","pull_request_url":"https://api.github.com/repos/cuappdev/eatery-backend/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/cuappdev/eatery-backend/pulls/comments/59969774"},"html":{"href":"https://github.com/cuappdev/eatery-backend/pull/15#discussion_r59969774"},"pull_request":{"href":"https://api.github.com/repos/cuappdev/eatery-backend/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/cuappdev/eatery-backend/pulls/15","id":63505955,"html_url":"https://github.com/cuappdev/eatery-backend/pull/15","diff_url":"https://github.com/cuappdev/eatery-backend/pull/15.diff","patch_url":"https://github.com/cuappdev/eatery-backend/pull/15.patch","issue_url":"https://api.github.com/repos/cuappdev/eatery-backend/issues/15","number":15,"state":"open","locked":false,"title":"Feature/events","user":{"login":"Jma353","id":10677768,"avatar_url":"https://avatars.githubusercontent.com/u/10677768?v=3","gravatar_id":"","url":"https://api.github.com/users/Jma353","html_url":"https://github.com/Jma353","followers_url":"https://api.github.com/users/Jma353/followers","following_url":"https://api.github.com/users/Jma353/following{/other_user}","gists_url":"https://api.github.com/users/Jma353/gists{/gist_id}","starred_url":"https://api.github.com/users/Jma353/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jma353/subscriptions","organizations_url":"https://api.github.com/users/Jma353/orgs","repos_url":"https://api.github.com/users/Jma353/repos","events_url":"https://api.github.com/users/Jma353/events{/privacy}","received_events_url":"https://api.github.com/users/Jma353/received_events","type":"User","site_admin":false},"body":"Sessions, events, attendees with bash scripts to test certain endpoints.  Namespacing as well. ","created_at":"2016-03-20T20:13:48Z","updated_at":"2016-04-16T16:16:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ca924b0e6791a62a7af5dfccb3f2fff0f33e975b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cuappdev/eatery-backend/pulls/15/commits","review_comments_url":"https://api.github.com/repos/cuappdev/eatery-backend/pulls/15/comments","review_comment_url":"https://api.github.com/repos/cuappdev/eatery-backend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cuappdev/eatery-backend/issues/15/comments","statuses_url":"https://api.github.com/repos/cuappdev/eatery-backend/statuses/9b00c6aabff1598bb56530c305b56bfdf0b0af8d","head":{"label":"cuappdev:feature/events","ref":"feature/events","sha":"9b00c6aabff1598bb56530c305b56bfdf0b0af8d","user":{"login":"cuappdev","id":17533691,"avatar_url":"https://avatars.githubusercontent.com/u/17533691?v=3","gravatar_id":"","url":"https://api.github.com/users/cuappdev","html_url":"https://github.com/cuappdev","followers_url":"https://api.github.com/users/cuappdev/followers","following_url":"https://api.github.com/users/cuappdev/following{/other_user}","gists_url":"https://api.github.com/users/cuappdev/gists{/gist_id}","starred_url":"https://api.github.com/users/cuappdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cuappdev/subscriptions","organizations_url":"https://api.github.com/users/cuappdev/orgs","repos_url":"https://api.github.com/users/cuappdev/repos","events_url":"https://api.github.com/users/cuappdev/events{/privacy}","received_events_url":"https://api.github.com/users/cuappdev/received_events","type":"Organization","site_admin":false},"repo":{"id":52744226,"name":"eatery-backend","full_name":"cuappdev/eatery-backend","owner":{"login":"cuappdev","id":17533691,"avatar_url":"https://avatars.githubusercontent.com/u/17533691?v=3","gravatar_id":"","url":"https://api.github.com/users/cuappdev","html_url":"https://github.com/cuappdev","followers_url":"https://api.github.com/users/cuappdev/followers","following_url":"https://api.github.com/users/cuappdev/following{/other_user}","gists_url":"https://api.github.com/users/cuappdev/gists{/gist_id}","starred_url":"https://api.github.com/users/cuappdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cuappdev/subscriptions","organizations_url":"https://api.github.com/users/cuappdev/orgs","repos_url":"https://api.github.com/users/cuappdev/repos","events_url":"https://api.github.com/users/cuappdev/events{/privacy}","received_events_url":"https://api.github.com/users/cuappdev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cuappdev/eatery-backend","description":"Backend for eatery iOS application.","fork":false,"url":"https://api.github.com/repos/cuappdev/eatery-backend","forks_url":"https://api.github.com/repos/cuappdev/eatery-backend/forks","keys_url":"https://api.github.com/repos/cuappdev/eatery-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cuappdev/eatery-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cuappdev/eatery-backend/teams","hooks_url":"https://api.github.com/repos/cuappdev/eatery-backend/hooks","issue_events_url":"https://api.github.com/repos/cuappdev/eatery-backend/issues/events{/number}","events_url":"https://api.github.com/repos/cuappdev/eatery-backend/events","assignees_url":"https://api.github.com/repos/cuappdev/eatery-backend/assignees{/user}","branches_url":"https://api.github.com/repos/cuappdev/eatery-backend/branches{/branch}","tags_url":"https://api.github.com/repos/cuappdev/eatery-backend/tags","blobs_url":"https://api.github.com/repos/cuappdev/eatery-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cuappdev/eatery-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cuappdev/eatery-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/cuappdev/eatery-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cuappdev/eatery-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/cuappdev/eatery-backend/languages","stargazers_url":"https://api.github.com/repos/cuappdev/eatery-backend/stargazers","contributors_url":"https://api.github.com/repos/cuappdev/eatery-backend/contributors","subscribers_url":"https://api.github.com/repos/cuappdev/eatery-backend/subscribers","subscription_url":"https://api.github.com/repos/cuappdev/eatery-backend/subscription","commits_url":"https://api.github.com/repos/cuappdev/eatery-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/cuappdev/eatery-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/cuappdev/eatery-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/cuappdev/eatery-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/cuappdev/eatery-backend/contents/{+path}","compare_url":"https://api.github.com/repos/cuappdev/eatery-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cuappdev/eatery-backend/merges","archive_url":"https://api.github.com/repos/cuappdev/eatery-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cuappdev/eatery-backend/downloads","issues_url":"https://api.github.com/repos/cuappdev/eatery-backend/issues{/number}","pulls_url":"https://api.github.com/repos/cuappdev/eatery-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/cuappdev/eatery-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/cuappdev/eatery-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cuappdev/eatery-backend/labels{/name}","releases_url":"https://api.github.com/repos/cuappdev/eatery-backend/releases{/id}","deployments_url":"https://api.github.com/repos/cuappdev/eatery-backend/deployments","created_at":"2016-02-28T21:08:03Z","updated_at":"2016-02-29T21:13:54Z","pushed_at":"2016-04-07T03:12:26Z","git_url":"git://github.com/cuappdev/eatery-backend.git","ssh_url":"git@github.com:cuappdev/eatery-backend.git","clone_url":"https://github.com/cuappdev/eatery-backend.git","svn_url":"https://github.com/cuappdev/eatery-backend","homepage":"","size":102,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":2,"default_branch":"master"}},"base":{"label":"cuappdev:master","ref":"master","sha":"75f45b09409cd8c9021c156ca2c23bde518b6777","user":{"login":"cuappdev","id":17533691,"avatar_url":"https://avatars.githubusercontent.com/u/17533691?v=3","gravatar_id":"","url":"https://api.github.com/users/cuappdev","html_url":"https://github.com/cuappdev","followers_url":"https://api.github.com/users/cuappdev/followers","following_url":"https://api.github.com/users/cuappdev/following{/other_user}","gists_url":"https://api.github.com/users/cuappdev/gists{/gist_id}","starred_url":"https://api.github.com/users/cuappdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cuappdev/subscriptions","organizations_url":"https://api.github.com/users/cuappdev/orgs","repos_url":"https://api.github.com/users/cuappdev/repos","events_url":"https://api.github.com/users/cuappdev/events{/privacy}","received_events_url":"https://api.github.com/users/cuappdev/received_events","type":"Organization","site_admin":false},"repo":{"id":52744226,"name":"eatery-backend","full_name":"cuappdev/eatery-backend","owner":{"login":"cuappdev","id":17533691,"avatar_url":"https://avatars.githubusercontent.com/u/17533691?v=3","gravatar_id":"","url":"https://api.github.com/users/cuappdev","html_url":"https://github.com/cuappdev","followers_url":"https://api.github.com/users/cuappdev/followers","following_url":"https://api.github.com/users/cuappdev/following{/other_user}","gists_url":"https://api.github.com/users/cuappdev/gists{/gist_id}","starred_url":"https://api.github.com/users/cuappdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cuappdev/subscriptions","organizations_url":"https://api.github.com/users/cuappdev/orgs","repos_url":"https://api.github.com/users/cuappdev/repos","events_url":"https://api.github.com/users/cuappdev/events{/privacy}","received_events_url":"https://api.github.com/users/cuappdev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cuappdev/eatery-backend","description":"Backend for eatery iOS application.","fork":false,"url":"https://api.github.com/repos/cuappdev/eatery-backend","forks_url":"https://api.github.com/repos/cuappdev/eatery-backend/forks","keys_url":"https://api.github.com/repos/cuappdev/eatery-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cuappdev/eatery-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cuappdev/eatery-backend/teams","hooks_url":"https://api.github.com/repos/cuappdev/eatery-backend/hooks","issue_events_url":"https://api.github.com/repos/cuappdev/eatery-backend/issues/events{/number}","events_url":"https://api.github.com/repos/cuappdev/eatery-backend/events","assignees_url":"https://api.github.com/repos/cuappdev/eatery-backend/assignees{/user}","branches_url":"https://api.github.com/repos/cuappdev/eatery-backend/branches{/branch}","tags_url":"https://api.github.com/repos/cuappdev/eatery-backend/tags","blobs_url":"https://api.github.com/repos/cuappdev/eatery-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cuappdev/eatery-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cuappdev/eatery-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/cuappdev/eatery-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cuappdev/eatery-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/cuappdev/eatery-backend/languages","stargazers_url":"https://api.github.com/repos/cuappdev/eatery-backend/stargazers","contributors_url":"https://api.github.com/repos/cuappdev/eatery-backend/contributors","subscribers_url":"https://api.github.com/repos/cuappdev/eatery-backend/subscribers","subscription_url":"https://api.github.com/repos/cuappdev/eatery-backend/subscription","commits_url":"https://api.github.com/repos/cuappdev/eatery-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/cuappdev/eatery-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/cuappdev/eatery-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/cuappdev/eatery-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/cuappdev/eatery-backend/contents/{+path}","compare_url":"https://api.github.com/repos/cuappdev/eatery-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cuappdev/eatery-backend/merges","archive_url":"https://api.github.com/repos/cuappdev/eatery-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cuappdev/eatery-backend/downloads","issues_url":"https://api.github.com/repos/cuappdev/eatery-backend/issues{/number}","pulls_url":"https://api.github.com/repos/cuappdev/eatery-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/cuappdev/eatery-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/cuappdev/eatery-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cuappdev/eatery-backend/labels{/name}","releases_url":"https://api.github.com/repos/cuappdev/eatery-backend/releases{/id}","deployments_url":"https://api.github.com/repos/cuappdev/eatery-backend/deployments","created_at":"2016-02-28T21:08:03Z","updated_at":"2016-02-29T21:13:54Z","pushed_at":"2016-04-07T03:12:26Z","git_url":"git://github.com/cuappdev/eatery-backend.git","ssh_url":"git@github.com:cuappdev/eatery-backend.git","clone_url":"https://github.com/cuappdev/eatery-backend.git","svn_url":"https://github.com/cuappdev/eatery-backend","homepage":"","size":102,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cuappdev/eatery-backend/pulls/15"},"html":{"href":"https://github.com/cuappdev/eatery-backend/pull/15"},"issue":{"href":"https://api.github.com/repos/cuappdev/eatery-backend/issues/15"},"comments":{"href":"https://api.github.com/repos/cuappdev/eatery-backend/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/cuappdev/eatery-backend/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/cuappdev/eatery-backend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cuappdev/eatery-backend/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/cuappdev/eatery-backend/statuses/9b00c6aabff1598bb56530c305b56bfdf0b0af8d"}}}}