{"action":"created","comment":{"url":"https://api.github.com/repos/kawasakiatsushi/library/pulls/comments/24295641","id":24295641,"diff_hunk":"@@ -6,12 +7,12 @@ def index\n   def new\n     @lending = Lending.new\n     @members = Member.active_members\n-    @editions = Edition.where(book_id: params[:book_id])\n+    @books = Book.where(id: params[:book_id])\n   end\n \n   def create\n-    @lending = Lending.new(lending_params)\n-    if @lending.status == LendingStatus::ACTIVE ? @lending.save(context: :rent_valid) : @lending.save\n+    lending = Lending.new(lending_params)\n+    if lending.member.kind == MemberKind::STUDENT ? lending.save(context: :student_rent_valid) : lending.save(context: :universal_rent_valid)","path":"app/controllers/lendings_controller.rb","position":18,"original_position":18,"commit_id":"9a5a58ab69e9191e1599f08bbb5fd233f4462fca","original_commit_id":"9a5a58ab69e9191e1599f08bbb5fd233f4462fca","user":{"login":"kikaineko","id":724270,"avatar_url":"https://avatars.githubusercontent.com/u/724270?v=3","gravatar_id":"","url":"https://api.github.com/users/kikaineko","html_url":"https://github.com/kikaineko","followers_url":"https://api.github.com/users/kikaineko/followers","following_url":"https://api.github.com/users/kikaineko/following{/other_user}","gists_url":"https://api.github.com/users/kikaineko/gists{/gist_id}","starred_url":"https://api.github.com/users/kikaineko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kikaineko/subscriptions","organizations_url":"https://api.github.com/users/kikaineko/orgs","repos_url":"https://api.github.com/users/kikaineko/repos","events_url":"https://api.github.com/users/kikaineko/events{/privacy}","received_events_url":"https://api.github.com/users/kikaineko/received_events","type":"User","site_admin":false},"body":"`member.student?`とかってできるといいですね","created_at":"2015-02-08T03:59:25Z","updated_at":"2015-02-08T03:59:25Z","html_url":"https://github.com/kawasakiatsushi/library/pull/6#discussion_r24295641","pull_request_url":"https://api.github.com/repos/kawasakiatsushi/library/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/kawasakiatsushi/library/pulls/comments/24295641"},"html":{"href":"https://github.com/kawasakiatsushi/library/pull/6#discussion_r24295641"},"pull_request":{"href":"https://api.github.com/repos/kawasakiatsushi/library/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/kawasakiatsushi/library/pulls/6","id":28862549,"html_url":"https://github.com/kawasakiatsushi/library/pull/6","diff_url":"https://github.com/kawasakiatsushi/library/pull/6.diff","patch_url":"https://github.com/kawasakiatsushi/library/pull/6.patch","issue_url":"https://api.github.com/repos/kawasakiatsushi/library/issues/6","number":6,"state":"open","locked":false,"title":"Member management feature","user":{"login":"kawasakiatsushi","id":6297063,"avatar_url":"https://avatars.githubusercontent.com/u/6297063?v=3","gravatar_id":"","url":"https://api.github.com/users/kawasakiatsushi","html_url":"https://github.com/kawasakiatsushi","followers_url":"https://api.github.com/users/kawasakiatsushi/followers","following_url":"https://api.github.com/users/kawasakiatsushi/following{/other_user}","gists_url":"https://api.github.com/users/kawasakiatsushi/gists{/gist_id}","starred_url":"https://api.github.com/users/kawasakiatsushi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kawasakiatsushi/subscriptions","organizations_url":"https://api.github.com/users/kawasakiatsushi/orgs","repos_url":"https://api.github.com/users/kawasakiatsushi/repos","events_url":"https://api.github.com/users/kawasakiatsushi/events{/privacy}","received_events_url":"https://api.github.com/users/kawasakiatsushi/received_events","type":"User","site_admin":false},"body":"@kikaineko \r\n> - Memberの種別として一般と学生を作ってください。\r\n> - 学生は20冊、4週間、一般は10冊、2週間、借りれるとしてください（営業日は無視していいです）\r\n> - member#showを作って、延滞管理ができるようにしてください\r\n\r\n上記の機能をコミットします！","created_at":"2015-02-07T10:42:20Z","updated_at":"2015-02-08T03:59:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8cc70da5a0a9b7c31d0942468dfaf458a0f3921c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kawasakiatsushi/library/pulls/6/commits","review_comments_url":"https://api.github.com/repos/kawasakiatsushi/library/pulls/6/comments","review_comment_url":"https://api.github.com/repos/kawasakiatsushi/library/pulls/comments/{number}","comments_url":"https://api.github.com/repos/kawasakiatsushi/library/issues/6/comments","statuses_url":"https://api.github.com/repos/kawasakiatsushi/library/statuses/9a5a58ab69e9191e1599f08bbb5fd233f4462fca","head":{"label":"kawasakiatsushi:member_management_feature","ref":"member_management_feature","sha":"9a5a58ab69e9191e1599f08bbb5fd233f4462fca","user":{"login":"kawasakiatsushi","id":6297063,"avatar_url":"https://avatars.githubusercontent.com/u/6297063?v=3","gravatar_id":"","url":"https://api.github.com/users/kawasakiatsushi","html_url":"https://github.com/kawasakiatsushi","followers_url":"https://api.github.com/users/kawasakiatsushi/followers","following_url":"https://api.github.com/users/kawasakiatsushi/following{/other_user}","gists_url":"https://api.github.com/users/kawasakiatsushi/gists{/gist_id}","starred_url":"https://api.github.com/users/kawasakiatsushi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kawasakiatsushi/subscriptions","organizations_url":"https://api.github.com/users/kawasakiatsushi/orgs","repos_url":"https://api.github.com/users/kawasakiatsushi/repos","events_url":"https://api.github.com/users/kawasakiatsushi/events{/privacy}","received_events_url":"https://api.github.com/users/kawasakiatsushi/received_events","type":"User","site_admin":false},"repo":{"id":26906013,"name":"library","full_name":"kawasakiatsushi/library","owner":{"login":"kawasakiatsushi","id":6297063,"avatar_url":"https://avatars.githubusercontent.com/u/6297063?v=3","gravatar_id":"","url":"https://api.github.com/users/kawasakiatsushi","html_url":"https://github.com/kawasakiatsushi","followers_url":"https://api.github.com/users/kawasakiatsushi/followers","following_url":"https://api.github.com/users/kawasakiatsushi/following{/other_user}","gists_url":"https://api.github.com/users/kawasakiatsushi/gists{/gist_id}","starred_url":"https://api.github.com/users/kawasakiatsushi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kawasakiatsushi/subscriptions","organizations_url":"https://api.github.com/users/kawasakiatsushi/orgs","repos_url":"https://api.github.com/users/kawasakiatsushi/repos","events_url":"https://api.github.com/users/kawasakiatsushi/events{/privacy}","received_events_url":"https://api.github.com/users/kawasakiatsushi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kawasakiatsushi/library","description":"","fork":false,"url":"https://api.github.com/repos/kawasakiatsushi/library","forks_url":"https://api.github.com/repos/kawasakiatsushi/library/forks","keys_url":"https://api.github.com/repos/kawasakiatsushi/library/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kawasakiatsushi/library/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kawasakiatsushi/library/teams","hooks_url":"https://api.github.com/repos/kawasakiatsushi/library/hooks","issue_events_url":"https://api.github.com/repos/kawasakiatsushi/library/issues/events{/number}","events_url":"https://api.github.com/repos/kawasakiatsushi/library/events","assignees_url":"https://api.github.com/repos/kawasakiatsushi/library/assignees{/user}","branches_url":"https://api.github.com/repos/kawasakiatsushi/library/branches{/branch}","tags_url":"https://api.github.com/repos/kawasakiatsushi/library/tags","blobs_url":"https://api.github.com/repos/kawasakiatsushi/library/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kawasakiatsushi/library/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kawasakiatsushi/library/git/refs{/sha}","trees_url":"https://api.github.com/repos/kawasakiatsushi/library/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kawasakiatsushi/library/statuses/{sha}","languages_url":"https://api.github.com/repos/kawasakiatsushi/library/languages","stargazers_url":"https://api.github.com/repos/kawasakiatsushi/library/stargazers","contributors_url":"https://api.github.com/repos/kawasakiatsushi/library/contributors","subscribers_url":"https://api.github.com/repos/kawasakiatsushi/library/subscribers","subscription_url":"https://api.github.com/repos/kawasakiatsushi/library/subscription","commits_url":"https://api.github.com/repos/kawasakiatsushi/library/commits{/sha}","git_commits_url":"https://api.github.com/repos/kawasakiatsushi/library/git/commits{/sha}","comments_url":"https://api.github.com/repos/kawasakiatsushi/library/comments{/number}","issue_comment_url":"https://api.github.com/repos/kawasakiatsushi/library/issues/comments/{number}","contents_url":"https://api.github.com/repos/kawasakiatsushi/library/contents/{+path}","compare_url":"https://api.github.com/repos/kawasakiatsushi/library/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kawasakiatsushi/library/merges","archive_url":"https://api.github.com/repos/kawasakiatsushi/library/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kawasakiatsushi/library/downloads","issues_url":"https://api.github.com/repos/kawasakiatsushi/library/issues{/number}","pulls_url":"https://api.github.com/repos/kawasakiatsushi/library/pulls{/number}","milestones_url":"https://api.github.com/repos/kawasakiatsushi/library/milestones{/number}","notifications_url":"https://api.github.com/repos/kawasakiatsushi/library/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kawasakiatsushi/library/labels{/name}","releases_url":"https://api.github.com/repos/kawasakiatsushi/library/releases{/id}","created_at":"2014-11-20T09:51:46Z","updated_at":"2015-01-28T13:43:16Z","pushed_at":"2015-02-07T10:41:01Z","git_url":"git://github.com/kawasakiatsushi/library.git","ssh_url":"git@github.com:kawasakiatsushi/library.git","clone_url":"https://github.com/kawasakiatsushi/library.git","svn_url":"https://github.com/kawasakiatsushi/library","homepage":null,"size":363,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":4,"forks":2,"open_issues":4,"watchers":1,"default_branch":"master"}},"base":{"label":"kawasakiatsushi:master","ref":"master","sha":"95fccd8b65251b09de7a71ae06b34fffee392edc","user":{"login":"kawasakiatsushi","id":6297063,"avatar_url":"https://avatars.githubusercontent.com/u/6297063?v=3","gravatar_id":"","url":"https://api.github.com/users/kawasakiatsushi","html_url":"https://github.com/kawasakiatsushi","followers_url":"https://api.github.com/users/kawasakiatsushi/followers","following_url":"https://api.github.com/users/kawasakiatsushi/following{/other_user}","gists_url":"https://api.github.com/users/kawasakiatsushi/gists{/gist_id}","starred_url":"https://api.github.com/users/kawasakiatsushi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kawasakiatsushi/subscriptions","organizations_url":"https://api.github.com/users/kawasakiatsushi/orgs","repos_url":"https://api.github.com/users/kawasakiatsushi/repos","events_url":"https://api.github.com/users/kawasakiatsushi/events{/privacy}","received_events_url":"https://api.github.com/users/kawasakiatsushi/received_events","type":"User","site_admin":false},"repo":{"id":26906013,"name":"library","full_name":"kawasakiatsushi/library","owner":{"login":"kawasakiatsushi","id":6297063,"avatar_url":"https://avatars.githubusercontent.com/u/6297063?v=3","gravatar_id":"","url":"https://api.github.com/users/kawasakiatsushi","html_url":"https://github.com/kawasakiatsushi","followers_url":"https://api.github.com/users/kawasakiatsushi/followers","following_url":"https://api.github.com/users/kawasakiatsushi/following{/other_user}","gists_url":"https://api.github.com/users/kawasakiatsushi/gists{/gist_id}","starred_url":"https://api.github.com/users/kawasakiatsushi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kawasakiatsushi/subscriptions","organizations_url":"https://api.github.com/users/kawasakiatsushi/orgs","repos_url":"https://api.github.com/users/kawasakiatsushi/repos","events_url":"https://api.github.com/users/kawasakiatsushi/events{/privacy}","received_events_url":"https://api.github.com/users/kawasakiatsushi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kawasakiatsushi/library","description":"","fork":false,"url":"https://api.github.com/repos/kawasakiatsushi/library","forks_url":"https://api.github.com/repos/kawasakiatsushi/library/forks","keys_url":"https://api.github.com/repos/kawasakiatsushi/library/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kawasakiatsushi/library/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kawasakiatsushi/library/teams","hooks_url":"https://api.github.com/repos/kawasakiatsushi/library/hooks","issue_events_url":"https://api.github.com/repos/kawasakiatsushi/library/issues/events{/number}","events_url":"https://api.github.com/repos/kawasakiatsushi/library/events","assignees_url":"https://api.github.com/repos/kawasakiatsushi/library/assignees{/user}","branches_url":"https://api.github.com/repos/kawasakiatsushi/library/branches{/branch}","tags_url":"https://api.github.com/repos/kawasakiatsushi/library/tags","blobs_url":"https://api.github.com/repos/kawasakiatsushi/library/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kawasakiatsushi/library/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kawasakiatsushi/library/git/refs{/sha}","trees_url":"https://api.github.com/repos/kawasakiatsushi/library/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kawasakiatsushi/library/statuses/{sha}","languages_url":"https://api.github.com/repos/kawasakiatsushi/library/languages","stargazers_url":"https://api.github.com/repos/kawasakiatsushi/library/stargazers","contributors_url":"https://api.github.com/repos/kawasakiatsushi/library/contributors","subscribers_url":"https://api.github.com/repos/kawasakiatsushi/library/subscribers","subscription_url":"https://api.github.com/repos/kawasakiatsushi/library/subscription","commits_url":"https://api.github.com/repos/kawasakiatsushi/library/commits{/sha}","git_commits_url":"https://api.github.com/repos/kawasakiatsushi/library/git/commits{/sha}","comments_url":"https://api.github.com/repos/kawasakiatsushi/library/comments{/number}","issue_comment_url":"https://api.github.com/repos/kawasakiatsushi/library/issues/comments/{number}","contents_url":"https://api.github.com/repos/kawasakiatsushi/library/contents/{+path}","compare_url":"https://api.github.com/repos/kawasakiatsushi/library/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kawasakiatsushi/library/merges","archive_url":"https://api.github.com/repos/kawasakiatsushi/library/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kawasakiatsushi/library/downloads","issues_url":"https://api.github.com/repos/kawasakiatsushi/library/issues{/number}","pulls_url":"https://api.github.com/repos/kawasakiatsushi/library/pulls{/number}","milestones_url":"https://api.github.com/repos/kawasakiatsushi/library/milestones{/number}","notifications_url":"https://api.github.com/repos/kawasakiatsushi/library/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kawasakiatsushi/library/labels{/name}","releases_url":"https://api.github.com/repos/kawasakiatsushi/library/releases{/id}","created_at":"2014-11-20T09:51:46Z","updated_at":"2015-01-28T13:43:16Z","pushed_at":"2015-02-07T10:41:01Z","git_url":"git://github.com/kawasakiatsushi/library.git","ssh_url":"git@github.com:kawasakiatsushi/library.git","clone_url":"https://github.com/kawasakiatsushi/library.git","svn_url":"https://github.com/kawasakiatsushi/library","homepage":null,"size":363,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":4,"forks":2,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kawasakiatsushi/library/pulls/6"},"html":{"href":"https://github.com/kawasakiatsushi/library/pull/6"},"issue":{"href":"https://api.github.com/repos/kawasakiatsushi/library/issues/6"},"comments":{"href":"https://api.github.com/repos/kawasakiatsushi/library/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/kawasakiatsushi/library/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/kawasakiatsushi/library/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/kawasakiatsushi/library/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/kawasakiatsushi/library/statuses/9a5a58ab69e9191e1599f08bbb5fd233f4462fca"}}}}