{"action":"created","comment":{"url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/pulls/comments/211086601","pull_request_review_id":147442052,"id":211086601,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMTA4NjYwMQ==","diff_hunk":"@@ -0,0 +1,63 @@\n+class PaymentsController < ApplicationController\n+  before_action :set_payment, only: [:edit, :update, :destroy]\n+  before_action :validates_role, only: [:new, :edit, :update, :create]\n+  before_action :validates_admin, only: :destroy\n+\n+  def new\n+    find_project\n+    @payment = Payment.new\n+  end\n+\n+  def create\n+    @payment = Payment.new(payment_params)\n+    @payment.project_id = params[:project_id]\n+\n+    if @payment.save\n+      redirect_to projects_path, notice: 'Payment was successfully created.'\n+    else\n+      find_project\n+      render :new\n+    end\n+  end\n+\n+  def edit\n+    find_project\n+  end\n+\n+  def update\n+    find_project","path":"app/controllers/payments_controller.rb","position":28,"original_position":28,"commit_id":"d9a7c95937de23bd3c56b188f7a16b7396a1d943","original_commit_id":"d9a7c95937de23bd3c56b188f7a16b7396a1d943","user":{"login":"taimur-akhtar","id":7848314,"node_id":"MDQ6VXNlcjc4NDgzMTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/7848314?v=4","gravatar_id":"","url":"https://api.github.com/users/taimur-akhtar","html_url":"https://github.com/taimur-akhtar","followers_url":"https://api.github.com/users/taimur-akhtar/followers","following_url":"https://api.github.com/users/taimur-akhtar/following{/other_user}","gists_url":"https://api.github.com/users/taimur-akhtar/gists{/gist_id}","starred_url":"https://api.github.com/users/taimur-akhtar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taimur-akhtar/subscriptions","organizations_url":"https://api.github.com/users/taimur-akhtar/orgs","repos_url":"https://api.github.com/users/taimur-akhtar/repos","events_url":"https://api.github.com/users/taimur-akhtar/events{/privacy}","received_events_url":"https://api.github.com/users/taimur-akhtar/received_events","type":"User","site_admin":false},"body":"though do we really need find project here?","created_at":"2018-08-18T22:03:58Z","updated_at":"2018-08-18T22:03:58Z","html_url":"https://github.com/SumraYasmin/Rails_Demo_Project/pull/2#discussion_r211086601","pull_request_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/pulls/2","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/pulls/comments/211086601"},"html":{"href":"https://github.com/SumraYasmin/Rails_Demo_Project/pull/2#discussion_r211086601"},"pull_request":{"href":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/pulls/2"}},"in_reply_to_id":211086575},"pull_request":{"url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/pulls/2","id":208532878,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4NTMyODc4","html_url":"https://github.com/SumraYasmin/Rails_Demo_Project/pull/2","diff_url":"https://github.com/SumraYasmin/Rails_Demo_Project/pull/2.diff","patch_url":"https://github.com/SumraYasmin/Rails_Demo_Project/pull/2.patch","issue_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/issues/2","number":2,"state":"open","locked":false,"title":"Project:CRUD compeleted","user":{"login":"SumraYasmin","id":31057483,"node_id":"MDQ6VXNlcjMxMDU3NDgz","avatar_url":"https://avatars0.githubusercontent.com/u/31057483?v=4","gravatar_id":"","url":"https://api.github.com/users/SumraYasmin","html_url":"https://github.com/SumraYasmin","followers_url":"https://api.github.com/users/SumraYasmin/followers","following_url":"https://api.github.com/users/SumraYasmin/following{/other_user}","gists_url":"https://api.github.com/users/SumraYasmin/gists{/gist_id}","starred_url":"https://api.github.com/users/SumraYasmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SumraYasmin/subscriptions","organizations_url":"https://api.github.com/users/SumraYasmin/orgs","repos_url":"https://api.github.com/users/SumraYasmin/repos","events_url":"https://api.github.com/users/SumraYasmin/events{/privacy}","received_events_url":"https://api.github.com/users/SumraYasmin/received_events","type":"User","site_admin":false},"body":"Implemented Project related functionality","created_at":"2018-08-15T11:00:57Z","updated_at":"2018-08-18T22:03:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c1af43d733a20fb509dc653684acf4c7a070093","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/pulls/2/commits","review_comments_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/pulls/2/comments","review_comment_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/issues/2/comments","statuses_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/statuses/d9a7c95937de23bd3c56b188f7a16b7396a1d943","head":{"label":"SumraYasmin:development","ref":"development","sha":"d9a7c95937de23bd3c56b188f7a16b7396a1d943","user":{"login":"SumraYasmin","id":31057483,"node_id":"MDQ6VXNlcjMxMDU3NDgz","avatar_url":"https://avatars0.githubusercontent.com/u/31057483?v=4","gravatar_id":"","url":"https://api.github.com/users/SumraYasmin","html_url":"https://github.com/SumraYasmin","followers_url":"https://api.github.com/users/SumraYasmin/followers","following_url":"https://api.github.com/users/SumraYasmin/following{/other_user}","gists_url":"https://api.github.com/users/SumraYasmin/gists{/gist_id}","starred_url":"https://api.github.com/users/SumraYasmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SumraYasmin/subscriptions","organizations_url":"https://api.github.com/users/SumraYasmin/orgs","repos_url":"https://api.github.com/users/SumraYasmin/repos","events_url":"https://api.github.com/users/SumraYasmin/events{/privacy}","received_events_url":"https://api.github.com/users/SumraYasmin/received_events","type":"User","site_admin":false},"repo":{"id":144099503,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQwOTk1MDM=","name":"Rails_Demo_Project","full_name":"SumraYasmin/Rails_Demo_Project","owner":{"login":"SumraYasmin","id":31057483,"node_id":"MDQ6VXNlcjMxMDU3NDgz","avatar_url":"https://avatars0.githubusercontent.com/u/31057483?v=4","gravatar_id":"","url":"https://api.github.com/users/SumraYasmin","html_url":"https://github.com/SumraYasmin","followers_url":"https://api.github.com/users/SumraYasmin/followers","following_url":"https://api.github.com/users/SumraYasmin/following{/other_user}","gists_url":"https://api.github.com/users/SumraYasmin/gists{/gist_id}","starred_url":"https://api.github.com/users/SumraYasmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SumraYasmin/subscriptions","organizations_url":"https://api.github.com/users/SumraYasmin/orgs","repos_url":"https://api.github.com/users/SumraYasmin/repos","events_url":"https://api.github.com/users/SumraYasmin/events{/privacy}","received_events_url":"https://api.github.com/users/SumraYasmin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SumraYasmin/Rails_Demo_Project","description":"It is an application for managing projects.","fork":false,"url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project","forks_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/forks","keys_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/teams","hooks_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/hooks","issue_events_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/issues/events{/number}","events_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/events","assignees_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/assignees{/user}","branches_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/branches{/branch}","tags_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/tags","blobs_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/git/refs{/sha}","trees_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/statuses/{sha}","languages_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/languages","stargazers_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/stargazers","contributors_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/contributors","subscribers_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/subscribers","subscription_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/subscription","commits_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/commits{/sha}","git_commits_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/git/commits{/sha}","comments_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/comments{/number}","issue_comment_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/issues/comments{/number}","contents_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/contents/{+path}","compare_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/merges","archive_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/downloads","issues_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/issues{/number}","pulls_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/pulls{/number}","milestones_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/milestones{/number}","notifications_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/labels{/name}","releases_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/releases{/id}","deployments_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/deployments","created_at":"2018-08-09T04:08:48Z","updated_at":"2018-08-15T10:55:58Z","pushed_at":"2018-08-18T14:08:54Z","git_url":"git://github.com/SumraYasmin/Rails_Demo_Project.git","ssh_url":"git@github.com:SumraYasmin/Rails_Demo_Project.git","clone_url":"https://github.com/SumraYasmin/Rails_Demo_Project.git","svn_url":"https://github.com/SumraYasmin/Rails_Demo_Project","homepage":null,"size":108,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"SumraYasmin:master","ref":"master","sha":"05135cc4e02c18497c3ce8d4ac7876fbd7b10091","user":{"login":"SumraYasmin","id":31057483,"node_id":"MDQ6VXNlcjMxMDU3NDgz","avatar_url":"https://avatars0.githubusercontent.com/u/31057483?v=4","gravatar_id":"","url":"https://api.github.com/users/SumraYasmin","html_url":"https://github.com/SumraYasmin","followers_url":"https://api.github.com/users/SumraYasmin/followers","following_url":"https://api.github.com/users/SumraYasmin/following{/other_user}","gists_url":"https://api.github.com/users/SumraYasmin/gists{/gist_id}","starred_url":"https://api.github.com/users/SumraYasmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SumraYasmin/subscriptions","organizations_url":"https://api.github.com/users/SumraYasmin/orgs","repos_url":"https://api.github.com/users/SumraYasmin/repos","events_url":"https://api.github.com/users/SumraYasmin/events{/privacy}","received_events_url":"https://api.github.com/users/SumraYasmin/received_events","type":"User","site_admin":false},"repo":{"id":144099503,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQwOTk1MDM=","name":"Rails_Demo_Project","full_name":"SumraYasmin/Rails_Demo_Project","owner":{"login":"SumraYasmin","id":31057483,"node_id":"MDQ6VXNlcjMxMDU3NDgz","avatar_url":"https://avatars0.githubusercontent.com/u/31057483?v=4","gravatar_id":"","url":"https://api.github.com/users/SumraYasmin","html_url":"https://github.com/SumraYasmin","followers_url":"https://api.github.com/users/SumraYasmin/followers","following_url":"https://api.github.com/users/SumraYasmin/following{/other_user}","gists_url":"https://api.github.com/users/SumraYasmin/gists{/gist_id}","starred_url":"https://api.github.com/users/SumraYasmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SumraYasmin/subscriptions","organizations_url":"https://api.github.com/users/SumraYasmin/orgs","repos_url":"https://api.github.com/users/SumraYasmin/repos","events_url":"https://api.github.com/users/SumraYasmin/events{/privacy}","received_events_url":"https://api.github.com/users/SumraYasmin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SumraYasmin/Rails_Demo_Project","description":"It is an application for managing projects.","fork":false,"url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project","forks_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/forks","keys_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/teams","hooks_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/hooks","issue_events_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/issues/events{/number}","events_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/events","assignees_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/assignees{/user}","branches_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/branches{/branch}","tags_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/tags","blobs_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/git/refs{/sha}","trees_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/statuses/{sha}","languages_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/languages","stargazers_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/stargazers","contributors_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/contributors","subscribers_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/subscribers","subscription_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/subscription","commits_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/commits{/sha}","git_commits_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/git/commits{/sha}","comments_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/comments{/number}","issue_comment_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/issues/comments{/number}","contents_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/contents/{+path}","compare_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/merges","archive_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/downloads","issues_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/issues{/number}","pulls_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/pulls{/number}","milestones_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/milestones{/number}","notifications_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/labels{/name}","releases_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/releases{/id}","deployments_url":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/deployments","created_at":"2018-08-09T04:08:48Z","updated_at":"2018-08-15T10:55:58Z","pushed_at":"2018-08-18T14:08:54Z","git_url":"git://github.com/SumraYasmin/Rails_Demo_Project.git","ssh_url":"git@github.com:SumraYasmin/Rails_Demo_Project.git","clone_url":"https://github.com/SumraYasmin/Rails_Demo_Project.git","svn_url":"https://github.com/SumraYasmin/Rails_Demo_Project","homepage":null,"size":108,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/pulls/2"},"html":{"href":"https://github.com/SumraYasmin/Rails_Demo_Project/pull/2"},"issue":{"href":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/issues/2"},"comments":{"href":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/SumraYasmin/Rails_Demo_Project/statuses/d9a7c95937de23bd3c56b188f7a16b7396a1d943"}},"author_association":"OWNER"}}
{"actor":{"display_login":"taimur-akhtar"}}