{"action":"created","comment":{"url":"https://api.github.com/repos/agdraft/agdraft/pulls/comments/78529976","id":78529976,"diff_hunk":"@@ -31,16 +31,43 @@ def update\n   end\n \n   def index\n-    @jobs = current_farmer.jobs\n+    @jobs = current_farmer.jobs.where(published: false)\n+  end\n+\n+  def published\n+    @jobs = current_farmer.jobs.where(published: true)\n+    @nav_item = \"jobs_published\"\n   end\n \n   def show\n   end\n \n+  def publish_confirm\n+    @job = Job.find(params[:id])\n+    return redirect_to farmer_published_jobs_path if @job.published\n+  end\n+\n+  def publish\n+    @job = Job.find(params[:id])\n+    if @job.publish\n+      flash[:success] = \"You have successfully published your job advertisment. An e-mail receipt will be delivered to you shortly\"\n+      redirect_to farmer_published_jobs_path\n+    else\n+      flash[:error] = \"There was a problem processing your payment, please make sure your payment information is valid and try again\"\n+      render \"publish_confirm\"\n+    end\n+  end\n+\n+  def live","path":"app/controllers/farmers/jobs_controller.rb","position":32,"original_position":32,"commit_id":"11b5dcbcf7b9a81f121519dac27dbd2eaa4a8ba2","original_commit_id":"11b5dcbcf7b9a81f121519dac27dbd2eaa4a8ba2","user":{"login":"groeneveld91","id":504721,"avatar_url":"https://avatars.githubusercontent.com/u/504721?v=3","gravatar_id":"","url":"https://api.github.com/users/groeneveld91","html_url":"https://github.com/groeneveld91","followers_url":"https://api.github.com/users/groeneveld91/followers","following_url":"https://api.github.com/users/groeneveld91/following{/other_user}","gists_url":"https://api.github.com/users/groeneveld91/gists{/gist_id}","starred_url":"https://api.github.com/users/groeneveld91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/groeneveld91/subscriptions","organizations_url":"https://api.github.com/users/groeneveld91/orgs","repos_url":"https://api.github.com/users/groeneveld91/repos","events_url":"https://api.github.com/users/groeneveld91/events{/privacy}","received_events_url":"https://api.github.com/users/groeneveld91/received_events","type":"User","site_admin":false},"body":"wanted to do live action as opposed to a more general update ? ","created_at":"2016-09-13T10:01:10Z","updated_at":"2016-09-13T10:01:10Z","html_url":"https://github.com/agdraft/agdraft/pull/16#discussion_r78529976","pull_request_url":"https://api.github.com/repos/agdraft/agdraft/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/agdraft/agdraft/pulls/comments/78529976"},"html":{"href":"https://github.com/agdraft/agdraft/pull/16#discussion_r78529976"},"pull_request":{"href":"https://api.github.com/repos/agdraft/agdraft/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/agdraft/agdraft/pulls/16","id":84892840,"html_url":"https://github.com/agdraft/agdraft/pull/16","diff_url":"https://github.com/agdraft/agdraft/pull/16.diff","patch_url":"https://github.com/agdraft/agdraft/pull/16.patch","issue_url":"https://api.github.com/repos/agdraft/agdraft/issues/16","number":16,"state":"open","locked":false,"title":"[FEATURE] Publish Jobs","user":{"login":"xandergroeneveld","id":322052,"avatar_url":"https://avatars.githubusercontent.com/u/322052?v=3","gravatar_id":"","url":"https://api.github.com/users/xandergroeneveld","html_url":"https://github.com/xandergroeneveld","followers_url":"https://api.github.com/users/xandergroeneveld/followers","following_url":"https://api.github.com/users/xandergroeneveld/following{/other_user}","gists_url":"https://api.github.com/users/xandergroeneveld/gists{/gist_id}","starred_url":"https://api.github.com/users/xandergroeneveld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xandergroeneveld/subscriptions","organizations_url":"https://api.github.com/users/xandergroeneveld/orgs","repos_url":"https://api.github.com/users/xandergroeneveld/repos","events_url":"https://api.github.com/users/xandergroeneveld/events{/privacy}","received_events_url":"https://api.github.com/users/xandergroeneveld/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-12T15:32:30Z","updated_at":"2016-09-13T10:01:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"90faeac01dfdd14265b0f89f11524eac5c183bb2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/agdraft/agdraft/pulls/16/commits","review_comments_url":"https://api.github.com/repos/agdraft/agdraft/pulls/16/comments","review_comment_url":"https://api.github.com/repos/agdraft/agdraft/pulls/comments{/number}","comments_url":"https://api.github.com/repos/agdraft/agdraft/issues/16/comments","statuses_url":"https://api.github.com/repos/agdraft/agdraft/statuses/11b5dcbcf7b9a81f121519dac27dbd2eaa4a8ba2","head":{"label":"agdraft:feat/job_publish","ref":"feat/job_publish","sha":"11b5dcbcf7b9a81f121519dac27dbd2eaa4a8ba2","user":{"login":"agdraft","id":21982853,"avatar_url":"https://avatars.githubusercontent.com/u/21982853?v=3","gravatar_id":"","url":"https://api.github.com/users/agdraft","html_url":"https://github.com/agdraft","followers_url":"https://api.github.com/users/agdraft/followers","following_url":"https://api.github.com/users/agdraft/following{/other_user}","gists_url":"https://api.github.com/users/agdraft/gists{/gist_id}","starred_url":"https://api.github.com/users/agdraft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agdraft/subscriptions","organizations_url":"https://api.github.com/users/agdraft/orgs","repos_url":"https://api.github.com/users/agdraft/repos","events_url":"https://api.github.com/users/agdraft/events{/privacy}","received_events_url":"https://api.github.com/users/agdraft/received_events","type":"Organization","site_admin":false},"repo":{"id":66822822,"name":"agdraft","full_name":"agdraft/agdraft","owner":{"login":"agdraft","id":21982853,"avatar_url":"https://avatars.githubusercontent.com/u/21982853?v=3","gravatar_id":"","url":"https://api.github.com/users/agdraft","html_url":"https://github.com/agdraft","followers_url":"https://api.github.com/users/agdraft/followers","following_url":"https://api.github.com/users/agdraft/following{/other_user}","gists_url":"https://api.github.com/users/agdraft/gists{/gist_id}","starred_url":"https://api.github.com/users/agdraft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agdraft/subscriptions","organizations_url":"https://api.github.com/users/agdraft/orgs","repos_url":"https://api.github.com/users/agdraft/repos","events_url":"https://api.github.com/users/agdraft/events{/privacy}","received_events_url":"https://api.github.com/users/agdraft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/agdraft/agdraft","description":null,"fork":false,"url":"https://api.github.com/repos/agdraft/agdraft","forks_url":"https://api.github.com/repos/agdraft/agdraft/forks","keys_url":"https://api.github.com/repos/agdraft/agdraft/keys{/key_id}","collaborators_url":"https://api.github.com/repos/agdraft/agdraft/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/agdraft/agdraft/teams","hooks_url":"https://api.github.com/repos/agdraft/agdraft/hooks","issue_events_url":"https://api.github.com/repos/agdraft/agdraft/issues/events{/number}","events_url":"https://api.github.com/repos/agdraft/agdraft/events","assignees_url":"https://api.github.com/repos/agdraft/agdraft/assignees{/user}","branches_url":"https://api.github.com/repos/agdraft/agdraft/branches{/branch}","tags_url":"https://api.github.com/repos/agdraft/agdraft/tags","blobs_url":"https://api.github.com/repos/agdraft/agdraft/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/agdraft/agdraft/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/agdraft/agdraft/git/refs{/sha}","trees_url":"https://api.github.com/repos/agdraft/agdraft/git/trees{/sha}","statuses_url":"https://api.github.com/repos/agdraft/agdraft/statuses/{sha}","languages_url":"https://api.github.com/repos/agdraft/agdraft/languages","stargazers_url":"https://api.github.com/repos/agdraft/agdraft/stargazers","contributors_url":"https://api.github.com/repos/agdraft/agdraft/contributors","subscribers_url":"https://api.github.com/repos/agdraft/agdraft/subscribers","subscription_url":"https://api.github.com/repos/agdraft/agdraft/subscription","commits_url":"https://api.github.com/repos/agdraft/agdraft/commits{/sha}","git_commits_url":"https://api.github.com/repos/agdraft/agdraft/git/commits{/sha}","comments_url":"https://api.github.com/repos/agdraft/agdraft/comments{/number}","issue_comment_url":"https://api.github.com/repos/agdraft/agdraft/issues/comments{/number}","contents_url":"https://api.github.com/repos/agdraft/agdraft/contents/{+path}","compare_url":"https://api.github.com/repos/agdraft/agdraft/compare/{base}...{head}","merges_url":"https://api.github.com/repos/agdraft/agdraft/merges","archive_url":"https://api.github.com/repos/agdraft/agdraft/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/agdraft/agdraft/downloads","issues_url":"https://api.github.com/repos/agdraft/agdraft/issues{/number}","pulls_url":"https://api.github.com/repos/agdraft/agdraft/pulls{/number}","milestones_url":"https://api.github.com/repos/agdraft/agdraft/milestones{/number}","notifications_url":"https://api.github.com/repos/agdraft/agdraft/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/agdraft/agdraft/labels{/name}","releases_url":"https://api.github.com/repos/agdraft/agdraft/releases{/id}","deployments_url":"https://api.github.com/repos/agdraft/agdraft/deployments","created_at":"2016-08-29T07:46:33Z","updated_at":"2016-09-04T09:10:14Z","pushed_at":"2016-09-13T09:31:57Z","git_url":"git://github.com/agdraft/agdraft.git","ssh_url":"git@github.com:agdraft/agdraft.git","clone_url":"https://github.com/agdraft/agdraft.git","svn_url":"https://github.com/agdraft/agdraft","homepage":null,"size":4523,"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":"agdraft:master","ref":"master","sha":"e568bedb36ff02b0d5a3c18260ee82b7a883e78c","user":{"login":"agdraft","id":21982853,"avatar_url":"https://avatars.githubusercontent.com/u/21982853?v=3","gravatar_id":"","url":"https://api.github.com/users/agdraft","html_url":"https://github.com/agdraft","followers_url":"https://api.github.com/users/agdraft/followers","following_url":"https://api.github.com/users/agdraft/following{/other_user}","gists_url":"https://api.github.com/users/agdraft/gists{/gist_id}","starred_url":"https://api.github.com/users/agdraft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agdraft/subscriptions","organizations_url":"https://api.github.com/users/agdraft/orgs","repos_url":"https://api.github.com/users/agdraft/repos","events_url":"https://api.github.com/users/agdraft/events{/privacy}","received_events_url":"https://api.github.com/users/agdraft/received_events","type":"Organization","site_admin":false},"repo":{"id":66822822,"name":"agdraft","full_name":"agdraft/agdraft","owner":{"login":"agdraft","id":21982853,"avatar_url":"https://avatars.githubusercontent.com/u/21982853?v=3","gravatar_id":"","url":"https://api.github.com/users/agdraft","html_url":"https://github.com/agdraft","followers_url":"https://api.github.com/users/agdraft/followers","following_url":"https://api.github.com/users/agdraft/following{/other_user}","gists_url":"https://api.github.com/users/agdraft/gists{/gist_id}","starred_url":"https://api.github.com/users/agdraft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agdraft/subscriptions","organizations_url":"https://api.github.com/users/agdraft/orgs","repos_url":"https://api.github.com/users/agdraft/repos","events_url":"https://api.github.com/users/agdraft/events{/privacy}","received_events_url":"https://api.github.com/users/agdraft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/agdraft/agdraft","description":null,"fork":false,"url":"https://api.github.com/repos/agdraft/agdraft","forks_url":"https://api.github.com/repos/agdraft/agdraft/forks","keys_url":"https://api.github.com/repos/agdraft/agdraft/keys{/key_id}","collaborators_url":"https://api.github.com/repos/agdraft/agdraft/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/agdraft/agdraft/teams","hooks_url":"https://api.github.com/repos/agdraft/agdraft/hooks","issue_events_url":"https://api.github.com/repos/agdraft/agdraft/issues/events{/number}","events_url":"https://api.github.com/repos/agdraft/agdraft/events","assignees_url":"https://api.github.com/repos/agdraft/agdraft/assignees{/user}","branches_url":"https://api.github.com/repos/agdraft/agdraft/branches{/branch}","tags_url":"https://api.github.com/repos/agdraft/agdraft/tags","blobs_url":"https://api.github.com/repos/agdraft/agdraft/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/agdraft/agdraft/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/agdraft/agdraft/git/refs{/sha}","trees_url":"https://api.github.com/repos/agdraft/agdraft/git/trees{/sha}","statuses_url":"https://api.github.com/repos/agdraft/agdraft/statuses/{sha}","languages_url":"https://api.github.com/repos/agdraft/agdraft/languages","stargazers_url":"https://api.github.com/repos/agdraft/agdraft/stargazers","contributors_url":"https://api.github.com/repos/agdraft/agdraft/contributors","subscribers_url":"https://api.github.com/repos/agdraft/agdraft/subscribers","subscription_url":"https://api.github.com/repos/agdraft/agdraft/subscription","commits_url":"https://api.github.com/repos/agdraft/agdraft/commits{/sha}","git_commits_url":"https://api.github.com/repos/agdraft/agdraft/git/commits{/sha}","comments_url":"https://api.github.com/repos/agdraft/agdraft/comments{/number}","issue_comment_url":"https://api.github.com/repos/agdraft/agdraft/issues/comments{/number}","contents_url":"https://api.github.com/repos/agdraft/agdraft/contents/{+path}","compare_url":"https://api.github.com/repos/agdraft/agdraft/compare/{base}...{head}","merges_url":"https://api.github.com/repos/agdraft/agdraft/merges","archive_url":"https://api.github.com/repos/agdraft/agdraft/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/agdraft/agdraft/downloads","issues_url":"https://api.github.com/repos/agdraft/agdraft/issues{/number}","pulls_url":"https://api.github.com/repos/agdraft/agdraft/pulls{/number}","milestones_url":"https://api.github.com/repos/agdraft/agdraft/milestones{/number}","notifications_url":"https://api.github.com/repos/agdraft/agdraft/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/agdraft/agdraft/labels{/name}","releases_url":"https://api.github.com/repos/agdraft/agdraft/releases{/id}","deployments_url":"https://api.github.com/repos/agdraft/agdraft/deployments","created_at":"2016-08-29T07:46:33Z","updated_at":"2016-09-04T09:10:14Z","pushed_at":"2016-09-13T09:31:57Z","git_url":"git://github.com/agdraft/agdraft.git","ssh_url":"git@github.com:agdraft/agdraft.git","clone_url":"https://github.com/agdraft/agdraft.git","svn_url":"https://github.com/agdraft/agdraft","homepage":null,"size":4523,"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/agdraft/agdraft/pulls/16"},"html":{"href":"https://github.com/agdraft/agdraft/pull/16"},"issue":{"href":"https://api.github.com/repos/agdraft/agdraft/issues/16"},"comments":{"href":"https://api.github.com/repos/agdraft/agdraft/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/agdraft/agdraft/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/agdraft/agdraft/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/agdraft/agdraft/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/agdraft/agdraft/statuses/11b5dcbcf7b9a81f121519dac27dbd2eaa4a8ba2"}}}}
{"actor":{"display_login":"groeneveld91"}}