{"action":"created","comment":{"url":"https://api.github.com/repos/commit-tech/apollo/pulls/comments/102110964","pull_request_review_id":22856554,"id":102110964,"diff_hunk":"@@ -1,2 +1,58 @@\n class DutiesController < ApplicationController\n+  def index\n+    date = params[:date]\n+    starting_date = date - (date.cwdays - 1)\n+    @duties = Array.new(7)\n+    starting_date.upto(starting_date + 7) do |day|\n+      @duties.push(day)\n+    end\n+    @time_ranges = Time_range.all\n+    @places = Place.all\n+  end\n+\n+  def process_grab\n+    @user_id = User.find(user_id_params)\n+    @duty_id = Duty.find(duty_id_params)\n+\n+    # user_id of duty_id should and must be null\n+    redirect_to action: 'index' if @duty_id.update(@user_id)\n+  end\n+\n+  def process_drop\n+    @user_id = User.find(user_id_params)\n+    @duty_id = Duty.find(duty_id_params)\n+\n+    redirect_to action: 'index' if @duty_id.update(:user_id, nil)\n+  end\n+\n+  def edit\n+    @user_id = User.find(user_id_params)\n+    @duty_id = Duty.find(duty_id_params)\n+  end\n+\n+  def update\n+    @user_id = User.find(user_id_params)\n+    @duty_id = Duty.find(duty_id_params)\n+\n+    redirect_to action: 'index' if @duty_id.update(@user_id)\n+  end\n+\n+  def setdefault\n+    @user_id = User.find(user_id_params)\n+    @timeslot_id = Timeslot.find(timeslot_id_params)\n+\n+    redirect_to action: 'index' if @timeslot_id.update(@user_id)\n+  end\n+","path":"app/controllers/duties_controller.rb","position":46,"original_position":46,"commit_id":"795865397a6e330345c211d27834c6e23e5293de","original_commit_id":"795865397a6e330345c211d27834c6e23e5293de","user":{"login":"donjar","id":14049598,"avatar_url":"https://avatars.githubusercontent.com/u/14049598?v=3","gravatar_id":"","url":"https://api.github.com/users/donjar","html_url":"https://github.com/donjar","followers_url":"https://api.github.com/users/donjar/followers","following_url":"https://api.github.com/users/donjar/following{/other_user}","gists_url":"https://api.github.com/users/donjar/gists{/gist_id}","starred_url":"https://api.github.com/users/donjar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donjar/subscriptions","organizations_url":"https://api.github.com/users/donjar/orgs","repos_url":"https://api.github.com/users/donjar/repos","events_url":"https://api.github.com/users/donjar/events{/privacy}","received_events_url":"https://api.github.com/users/donjar/received_events","type":"User","site_admin":false},"body":"Add `private` here","created_at":"2017-02-21T00:12:41Z","updated_at":"2017-02-21T00:18:13Z","html_url":"https://github.com/commit-tech/apollo/pull/7#discussion_r102110964","pull_request_url":"https://api.github.com/repos/commit-tech/apollo/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/commit-tech/apollo/pulls/comments/102110964"},"html":{"href":"https://github.com/commit-tech/apollo/pull/7#discussion_r102110964"},"pull_request":{"href":"https://api.github.com/repos/commit-tech/apollo/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/commit-tech/apollo/pulls/7","id":107056701,"html_url":"https://github.com/commit-tech/apollo/pull/7","diff_url":"https://github.com/commit-tech/apollo/pull/7.diff","patch_url":"https://github.com/commit-tech/apollo/pull/7.patch","issue_url":"https://api.github.com/repos/commit-tech/apollo/issues/7","number":7,"state":"open","locked":false,"title":"Controllers","user":{"login":"emer7","id":21377166,"avatar_url":"https://avatars.githubusercontent.com/u/21377166?v=3","gravatar_id":"","url":"https://api.github.com/users/emer7","html_url":"https://github.com/emer7","followers_url":"https://api.github.com/users/emer7/followers","following_url":"https://api.github.com/users/emer7/following{/other_user}","gists_url":"https://api.github.com/users/emer7/gists{/gist_id}","starred_url":"https://api.github.com/users/emer7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emer7/subscriptions","organizations_url":"https://api.github.com/users/emer7/orgs","repos_url":"https://api.github.com/users/emer7/repos","events_url":"https://api.github.com/users/emer7/events{/privacy}","received_events_url":"https://api.github.com/users/emer7/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-02-20T18:18:29Z","updated_at":"2017-02-21T00:18:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"63b2a0465e4ae26ed6be7c92ddb9bf3c0656db6c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/commit-tech/apollo/pulls/7/commits","review_comments_url":"https://api.github.com/repos/commit-tech/apollo/pulls/7/comments","review_comment_url":"https://api.github.com/repos/commit-tech/apollo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/commit-tech/apollo/issues/7/comments","statuses_url":"https://api.github.com/repos/commit-tech/apollo/statuses/795865397a6e330345c211d27834c6e23e5293de","head":{"label":"commit-tech:controllers","ref":"controllers","sha":"795865397a6e330345c211d27834c6e23e5293de","user":{"login":"commit-tech","id":25610172,"avatar_url":"https://avatars.githubusercontent.com/u/25610172?v=3","gravatar_id":"","url":"https://api.github.com/users/commit-tech","html_url":"https://github.com/commit-tech","followers_url":"https://api.github.com/users/commit-tech/followers","following_url":"https://api.github.com/users/commit-tech/following{/other_user}","gists_url":"https://api.github.com/users/commit-tech/gists{/gist_id}","starred_url":"https://api.github.com/users/commit-tech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/commit-tech/subscriptions","organizations_url":"https://api.github.com/users/commit-tech/orgs","repos_url":"https://api.github.com/users/commit-tech/repos","events_url":"https://api.github.com/users/commit-tech/events{/privacy}","received_events_url":"https://api.github.com/users/commit-tech/received_events","type":"Organization","site_admin":false},"repo":{"id":81202898,"name":"apollo","full_name":"commit-tech/apollo","owner":{"login":"commit-tech","id":25610172,"avatar_url":"https://avatars.githubusercontent.com/u/25610172?v=3","gravatar_id":"","url":"https://api.github.com/users/commit-tech","html_url":"https://github.com/commit-tech","followers_url":"https://api.github.com/users/commit-tech/followers","following_url":"https://api.github.com/users/commit-tech/following{/other_user}","gists_url":"https://api.github.com/users/commit-tech/gists{/gist_id}","starred_url":"https://api.github.com/users/commit-tech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/commit-tech/subscriptions","organizations_url":"https://api.github.com/users/commit-tech/orgs","repos_url":"https://api.github.com/users/commit-tech/repos","events_url":"https://api.github.com/users/commit-tech/events{/privacy}","received_events_url":"https://api.github.com/users/commit-tech/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/commit-tech/apollo","description":"NUSSU commIT Duty Website, iteration 3","fork":false,"url":"https://api.github.com/repos/commit-tech/apollo","forks_url":"https://api.github.com/repos/commit-tech/apollo/forks","keys_url":"https://api.github.com/repos/commit-tech/apollo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/commit-tech/apollo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/commit-tech/apollo/teams","hooks_url":"https://api.github.com/repos/commit-tech/apollo/hooks","issue_events_url":"https://api.github.com/repos/commit-tech/apollo/issues/events{/number}","events_url":"https://api.github.com/repos/commit-tech/apollo/events","assignees_url":"https://api.github.com/repos/commit-tech/apollo/assignees{/user}","branches_url":"https://api.github.com/repos/commit-tech/apollo/branches{/branch}","tags_url":"https://api.github.com/repos/commit-tech/apollo/tags","blobs_url":"https://api.github.com/repos/commit-tech/apollo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/commit-tech/apollo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/commit-tech/apollo/git/refs{/sha}","trees_url":"https://api.github.com/repos/commit-tech/apollo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/commit-tech/apollo/statuses/{sha}","languages_url":"https://api.github.com/repos/commit-tech/apollo/languages","stargazers_url":"https://api.github.com/repos/commit-tech/apollo/stargazers","contributors_url":"https://api.github.com/repos/commit-tech/apollo/contributors","subscribers_url":"https://api.github.com/repos/commit-tech/apollo/subscribers","subscription_url":"https://api.github.com/repos/commit-tech/apollo/subscription","commits_url":"https://api.github.com/repos/commit-tech/apollo/commits{/sha}","git_commits_url":"https://api.github.com/repos/commit-tech/apollo/git/commits{/sha}","comments_url":"https://api.github.com/repos/commit-tech/apollo/comments{/number}","issue_comment_url":"https://api.github.com/repos/commit-tech/apollo/issues/comments{/number}","contents_url":"https://api.github.com/repos/commit-tech/apollo/contents/{+path}","compare_url":"https://api.github.com/repos/commit-tech/apollo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/commit-tech/apollo/merges","archive_url":"https://api.github.com/repos/commit-tech/apollo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/commit-tech/apollo/downloads","issues_url":"https://api.github.com/repos/commit-tech/apollo/issues{/number}","pulls_url":"https://api.github.com/repos/commit-tech/apollo/pulls{/number}","milestones_url":"https://api.github.com/repos/commit-tech/apollo/milestones{/number}","notifications_url":"https://api.github.com/repos/commit-tech/apollo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/commit-tech/apollo/labels{/name}","releases_url":"https://api.github.com/repos/commit-tech/apollo/releases{/id}","deployments_url":"https://api.github.com/repos/commit-tech/apollo/deployments","created_at":"2017-02-07T11:55:07Z","updated_at":"2017-02-14T10:50:42Z","pushed_at":"2017-02-21T00:08:15Z","git_url":"git://github.com/commit-tech/apollo.git","ssh_url":"git@github.com:commit-tech/apollo.git","clone_url":"https://github.com/commit-tech/apollo.git","svn_url":"https://github.com/commit-tech/apollo","homepage":null,"size":169,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"commit-tech:master","ref":"master","sha":"ab78af8ef361420345023281ecd8608b46bc4715","user":{"login":"commit-tech","id":25610172,"avatar_url":"https://avatars.githubusercontent.com/u/25610172?v=3","gravatar_id":"","url":"https://api.github.com/users/commit-tech","html_url":"https://github.com/commit-tech","followers_url":"https://api.github.com/users/commit-tech/followers","following_url":"https://api.github.com/users/commit-tech/following{/other_user}","gists_url":"https://api.github.com/users/commit-tech/gists{/gist_id}","starred_url":"https://api.github.com/users/commit-tech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/commit-tech/subscriptions","organizations_url":"https://api.github.com/users/commit-tech/orgs","repos_url":"https://api.github.com/users/commit-tech/repos","events_url":"https://api.github.com/users/commit-tech/events{/privacy}","received_events_url":"https://api.github.com/users/commit-tech/received_events","type":"Organization","site_admin":false},"repo":{"id":81202898,"name":"apollo","full_name":"commit-tech/apollo","owner":{"login":"commit-tech","id":25610172,"avatar_url":"https://avatars.githubusercontent.com/u/25610172?v=3","gravatar_id":"","url":"https://api.github.com/users/commit-tech","html_url":"https://github.com/commit-tech","followers_url":"https://api.github.com/users/commit-tech/followers","following_url":"https://api.github.com/users/commit-tech/following{/other_user}","gists_url":"https://api.github.com/users/commit-tech/gists{/gist_id}","starred_url":"https://api.github.com/users/commit-tech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/commit-tech/subscriptions","organizations_url":"https://api.github.com/users/commit-tech/orgs","repos_url":"https://api.github.com/users/commit-tech/repos","events_url":"https://api.github.com/users/commit-tech/events{/privacy}","received_events_url":"https://api.github.com/users/commit-tech/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/commit-tech/apollo","description":"NUSSU commIT Duty Website, iteration 3","fork":false,"url":"https://api.github.com/repos/commit-tech/apollo","forks_url":"https://api.github.com/repos/commit-tech/apollo/forks","keys_url":"https://api.github.com/repos/commit-tech/apollo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/commit-tech/apollo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/commit-tech/apollo/teams","hooks_url":"https://api.github.com/repos/commit-tech/apollo/hooks","issue_events_url":"https://api.github.com/repos/commit-tech/apollo/issues/events{/number}","events_url":"https://api.github.com/repos/commit-tech/apollo/events","assignees_url":"https://api.github.com/repos/commit-tech/apollo/assignees{/user}","branches_url":"https://api.github.com/repos/commit-tech/apollo/branches{/branch}","tags_url":"https://api.github.com/repos/commit-tech/apollo/tags","blobs_url":"https://api.github.com/repos/commit-tech/apollo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/commit-tech/apollo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/commit-tech/apollo/git/refs{/sha}","trees_url":"https://api.github.com/repos/commit-tech/apollo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/commit-tech/apollo/statuses/{sha}","languages_url":"https://api.github.com/repos/commit-tech/apollo/languages","stargazers_url":"https://api.github.com/repos/commit-tech/apollo/stargazers","contributors_url":"https://api.github.com/repos/commit-tech/apollo/contributors","subscribers_url":"https://api.github.com/repos/commit-tech/apollo/subscribers","subscription_url":"https://api.github.com/repos/commit-tech/apollo/subscription","commits_url":"https://api.github.com/repos/commit-tech/apollo/commits{/sha}","git_commits_url":"https://api.github.com/repos/commit-tech/apollo/git/commits{/sha}","comments_url":"https://api.github.com/repos/commit-tech/apollo/comments{/number}","issue_comment_url":"https://api.github.com/repos/commit-tech/apollo/issues/comments{/number}","contents_url":"https://api.github.com/repos/commit-tech/apollo/contents/{+path}","compare_url":"https://api.github.com/repos/commit-tech/apollo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/commit-tech/apollo/merges","archive_url":"https://api.github.com/repos/commit-tech/apollo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/commit-tech/apollo/downloads","issues_url":"https://api.github.com/repos/commit-tech/apollo/issues{/number}","pulls_url":"https://api.github.com/repos/commit-tech/apollo/pulls{/number}","milestones_url":"https://api.github.com/repos/commit-tech/apollo/milestones{/number}","notifications_url":"https://api.github.com/repos/commit-tech/apollo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/commit-tech/apollo/labels{/name}","releases_url":"https://api.github.com/repos/commit-tech/apollo/releases{/id}","deployments_url":"https://api.github.com/repos/commit-tech/apollo/deployments","created_at":"2017-02-07T11:55:07Z","updated_at":"2017-02-14T10:50:42Z","pushed_at":"2017-02-21T00:08:15Z","git_url":"git://github.com/commit-tech/apollo.git","ssh_url":"git@github.com:commit-tech/apollo.git","clone_url":"https://github.com/commit-tech/apollo.git","svn_url":"https://github.com/commit-tech/apollo","homepage":null,"size":169,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/commit-tech/apollo/pulls/7"},"html":{"href":"https://github.com/commit-tech/apollo/pull/7"},"issue":{"href":"https://api.github.com/repos/commit-tech/apollo/issues/7"},"comments":{"href":"https://api.github.com/repos/commit-tech/apollo/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/commit-tech/apollo/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/commit-tech/apollo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/commit-tech/apollo/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/commit-tech/apollo/statuses/795865397a6e330345c211d27834c6e23e5293de"}}}}
{"actor":{"display_login":"donjar"}}