{"action":"created","comment":{"url":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/comments/31904490","id":31904490,"diff_hunk":"@@ -33,5 +38,26 @@ def destroy\n                                           user: current_user)\n       respond_with_mutation(:no_content)\n     end\n+\n+    private\n+\n+    def check_if_crop_exists(params)\n+      unless params[:crop_id].present?\n+        puts params[:crop_name]\n+        crops = Crop.search params[:crop_name], fields: [{name: :exact}]","path":"app/controllers/api/guides_controller.rb","position":30,"original_position":30,"commit_id":"53981add622be263f75db823fdf191af6a28d314","original_commit_id":"53981add622be263f75db823fdf191af6a28d314","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Space inside { missing.<br>Space inside } missing.","created_at":"2015-06-08T11:13:43Z","updated_at":"2015-06-08T11:13:43Z","html_url":"https://github.com/openfarmcc/OpenFarm/pull/646#discussion_r31904490","pull_request_url":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/646","_links":{"self":{"href":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/comments/31904490"},"html":{"href":"https://github.com/openfarmcc/OpenFarm/pull/646#discussion_r31904490"},"pull_request":{"href":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/646"}}},"pull_request":{"url":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/646","id":37142941,"html_url":"https://github.com/openfarmcc/OpenFarm/pull/646","diff_url":"https://github.com/openfarmcc/OpenFarm/pull/646.diff","patch_url":"https://github.com/openfarmcc/OpenFarm/pull/646.patch","issue_url":"https://api.github.com/repos/openfarmcc/OpenFarm/issues/646","number":646,"state":"open","locked":false,"title":"Close #608. Close #618. Make crop selection friendlier and more robust.","user":{"login":"simonv3","id":485583,"avatar_url":"https://avatars.githubusercontent.com/u/485583?v=3","gravatar_id":"","url":"https://api.github.com/users/simonv3","html_url":"https://github.com/simonv3","followers_url":"https://api.github.com/users/simonv3/followers","following_url":"https://api.github.com/users/simonv3/following{/other_user}","gists_url":"https://api.github.com/users/simonv3/gists{/gist_id}","starred_url":"https://api.github.com/users/simonv3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonv3/subscriptions","organizations_url":"https://api.github.com/users/simonv3/orgs","repos_url":"https://api.github.com/users/simonv3/repos","events_url":"https://api.github.com/users/simonv3/events{/privacy}","received_events_url":"https://api.github.com/users/simonv3/received_events","type":"User","site_admin":false},"body":"# What's Changed\r\n* Made crop suggestion work better (more specificity) and better typeahead.\r\n* The flow is now to create a crop by default if none is found.","created_at":"2015-06-08T11:13:36Z","updated_at":"2015-06-08T11:13:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cd08cf2abc994133ce6f65778d16cb891d552dc1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/646/commits","review_comments_url":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/646/comments","review_comment_url":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openfarmcc/OpenFarm/issues/646/comments","statuses_url":"https://api.github.com/repos/openfarmcc/OpenFarm/statuses/53981add622be263f75db823fdf191af6a28d314","head":{"label":"simonv3:master","ref":"master","sha":"53981add622be263f75db823fdf191af6a28d314","user":{"login":"simonv3","id":485583,"avatar_url":"https://avatars.githubusercontent.com/u/485583?v=3","gravatar_id":"","url":"https://api.github.com/users/simonv3","html_url":"https://github.com/simonv3","followers_url":"https://api.github.com/users/simonv3/followers","following_url":"https://api.github.com/users/simonv3/following{/other_user}","gists_url":"https://api.github.com/users/simonv3/gists{/gist_id}","starred_url":"https://api.github.com/users/simonv3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonv3/subscriptions","organizations_url":"https://api.github.com/users/simonv3/orgs","repos_url":"https://api.github.com/users/simonv3/repos","events_url":"https://api.github.com/users/simonv3/events{/privacy}","received_events_url":"https://api.github.com/users/simonv3/received_events","type":"User","site_admin":false},"repo":{"id":21980604,"name":"OpenFarm","full_name":"simonv3/OpenFarm","owner":{"login":"simonv3","id":485583,"avatar_url":"https://avatars.githubusercontent.com/u/485583?v=3","gravatar_id":"","url":"https://api.github.com/users/simonv3","html_url":"https://github.com/simonv3","followers_url":"https://api.github.com/users/simonv3/followers","following_url":"https://api.github.com/users/simonv3/following{/other_user}","gists_url":"https://api.github.com/users/simonv3/gists{/gist_id}","starred_url":"https://api.github.com/users/simonv3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonv3/subscriptions","organizations_url":"https://api.github.com/users/simonv3/orgs","repos_url":"https://api.github.com/users/simonv3/repos","events_url":"https://api.github.com/users/simonv3/events{/privacy}","received_events_url":"https://api.github.com/users/simonv3/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/simonv3/OpenFarm","description":"A free and open database for farming and gardening knowledge. Data will be crowdsourced and rated. Will feature advanced search of the plant database, responsive frontend, forum for community discussion on each entry, and an open API.","fork":true,"url":"https://api.github.com/repos/simonv3/OpenFarm","forks_url":"https://api.github.com/repos/simonv3/OpenFarm/forks","keys_url":"https://api.github.com/repos/simonv3/OpenFarm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/simonv3/OpenFarm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/simonv3/OpenFarm/teams","hooks_url":"https://api.github.com/repos/simonv3/OpenFarm/hooks","issue_events_url":"https://api.github.com/repos/simonv3/OpenFarm/issues/events{/number}","events_url":"https://api.github.com/repos/simonv3/OpenFarm/events","assignees_url":"https://api.github.com/repos/simonv3/OpenFarm/assignees{/user}","branches_url":"https://api.github.com/repos/simonv3/OpenFarm/branches{/branch}","tags_url":"https://api.github.com/repos/simonv3/OpenFarm/tags","blobs_url":"https://api.github.com/repos/simonv3/OpenFarm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/simonv3/OpenFarm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/simonv3/OpenFarm/git/refs{/sha}","trees_url":"https://api.github.com/repos/simonv3/OpenFarm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/simonv3/OpenFarm/statuses/{sha}","languages_url":"https://api.github.com/repos/simonv3/OpenFarm/languages","stargazers_url":"https://api.github.com/repos/simonv3/OpenFarm/stargazers","contributors_url":"https://api.github.com/repos/simonv3/OpenFarm/contributors","subscribers_url":"https://api.github.com/repos/simonv3/OpenFarm/subscribers","subscription_url":"https://api.github.com/repos/simonv3/OpenFarm/subscription","commits_url":"https://api.github.com/repos/simonv3/OpenFarm/commits{/sha}","git_commits_url":"https://api.github.com/repos/simonv3/OpenFarm/git/commits{/sha}","comments_url":"https://api.github.com/repos/simonv3/OpenFarm/comments{/number}","issue_comment_url":"https://api.github.com/repos/simonv3/OpenFarm/issues/comments{/number}","contents_url":"https://api.github.com/repos/simonv3/OpenFarm/contents/{+path}","compare_url":"https://api.github.com/repos/simonv3/OpenFarm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/simonv3/OpenFarm/merges","archive_url":"https://api.github.com/repos/simonv3/OpenFarm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/simonv3/OpenFarm/downloads","issues_url":"https://api.github.com/repos/simonv3/OpenFarm/issues{/number}","pulls_url":"https://api.github.com/repos/simonv3/OpenFarm/pulls{/number}","milestones_url":"https://api.github.com/repos/simonv3/OpenFarm/milestones{/number}","notifications_url":"https://api.github.com/repos/simonv3/OpenFarm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/simonv3/OpenFarm/labels{/name}","releases_url":"https://api.github.com/repos/simonv3/OpenFarm/releases{/id}","created_at":"2014-07-18T13:09:02Z","updated_at":"2015-05-06T06:40:22Z","pushed_at":"2015-06-08T11:12:14Z","git_url":"git://github.com/simonv3/OpenFarm.git","ssh_url":"git@github.com:simonv3/OpenFarm.git","clone_url":"https://github.com/simonv3/OpenFarm.git","svn_url":"https://github.com/simonv3/OpenFarm","homepage":"OpenFarm.cc","size":74503,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openfarmcc:master","ref":"master","sha":"7f9990796a2e24ff089e08c443d5ff1075f5c24a","user":{"login":"openfarmcc","id":10136787,"avatar_url":"https://avatars.githubusercontent.com/u/10136787?v=3","gravatar_id":"","url":"https://api.github.com/users/openfarmcc","html_url":"https://github.com/openfarmcc","followers_url":"https://api.github.com/users/openfarmcc/followers","following_url":"https://api.github.com/users/openfarmcc/following{/other_user}","gists_url":"https://api.github.com/users/openfarmcc/gists{/gist_id}","starred_url":"https://api.github.com/users/openfarmcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfarmcc/subscriptions","organizations_url":"https://api.github.com/users/openfarmcc/orgs","repos_url":"https://api.github.com/users/openfarmcc/repos","events_url":"https://api.github.com/users/openfarmcc/events{/privacy}","received_events_url":"https://api.github.com/users/openfarmcc/received_events","type":"Organization","site_admin":false},"repo":{"id":13895958,"name":"OpenFarm","full_name":"openfarmcc/OpenFarm","owner":{"login":"openfarmcc","id":10136787,"avatar_url":"https://avatars.githubusercontent.com/u/10136787?v=3","gravatar_id":"","url":"https://api.github.com/users/openfarmcc","html_url":"https://github.com/openfarmcc","followers_url":"https://api.github.com/users/openfarmcc/followers","following_url":"https://api.github.com/users/openfarmcc/following{/other_user}","gists_url":"https://api.github.com/users/openfarmcc/gists{/gist_id}","starred_url":"https://api.github.com/users/openfarmcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfarmcc/subscriptions","organizations_url":"https://api.github.com/users/openfarmcc/orgs","repos_url":"https://api.github.com/users/openfarmcc/repos","events_url":"https://api.github.com/users/openfarmcc/events{/privacy}","received_events_url":"https://api.github.com/users/openfarmcc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openfarmcc/OpenFarm","description":"A free and open database for farming and gardening knowledge. You can grow anything!","fork":false,"url":"https://api.github.com/repos/openfarmcc/OpenFarm","forks_url":"https://api.github.com/repos/openfarmcc/OpenFarm/forks","keys_url":"https://api.github.com/repos/openfarmcc/OpenFarm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openfarmcc/OpenFarm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openfarmcc/OpenFarm/teams","hooks_url":"https://api.github.com/repos/openfarmcc/OpenFarm/hooks","issue_events_url":"https://api.github.com/repos/openfarmcc/OpenFarm/issues/events{/number}","events_url":"https://api.github.com/repos/openfarmcc/OpenFarm/events","assignees_url":"https://api.github.com/repos/openfarmcc/OpenFarm/assignees{/user}","branches_url":"https://api.github.com/repos/openfarmcc/OpenFarm/branches{/branch}","tags_url":"https://api.github.com/repos/openfarmcc/OpenFarm/tags","blobs_url":"https://api.github.com/repos/openfarmcc/OpenFarm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openfarmcc/OpenFarm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openfarmcc/OpenFarm/git/refs{/sha}","trees_url":"https://api.github.com/repos/openfarmcc/OpenFarm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openfarmcc/OpenFarm/statuses/{sha}","languages_url":"https://api.github.com/repos/openfarmcc/OpenFarm/languages","stargazers_url":"https://api.github.com/repos/openfarmcc/OpenFarm/stargazers","contributors_url":"https://api.github.com/repos/openfarmcc/OpenFarm/contributors","subscribers_url":"https://api.github.com/repos/openfarmcc/OpenFarm/subscribers","subscription_url":"https://api.github.com/repos/openfarmcc/OpenFarm/subscription","commits_url":"https://api.github.com/repos/openfarmcc/OpenFarm/commits{/sha}","git_commits_url":"https://api.github.com/repos/openfarmcc/OpenFarm/git/commits{/sha}","comments_url":"https://api.github.com/repos/openfarmcc/OpenFarm/comments{/number}","issue_comment_url":"https://api.github.com/repos/openfarmcc/OpenFarm/issues/comments{/number}","contents_url":"https://api.github.com/repos/openfarmcc/OpenFarm/contents/{+path}","compare_url":"https://api.github.com/repos/openfarmcc/OpenFarm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openfarmcc/OpenFarm/merges","archive_url":"https://api.github.com/repos/openfarmcc/OpenFarm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openfarmcc/OpenFarm/downloads","issues_url":"https://api.github.com/repos/openfarmcc/OpenFarm/issues{/number}","pulls_url":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls{/number}","milestones_url":"https://api.github.com/repos/openfarmcc/OpenFarm/milestones{/number}","notifications_url":"https://api.github.com/repos/openfarmcc/OpenFarm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openfarmcc/OpenFarm/labels{/name}","releases_url":"https://api.github.com/repos/openfarmcc/OpenFarm/releases{/id}","created_at":"2013-10-27T04:46:37Z","updated_at":"2015-06-05T23:18:38Z","pushed_at":"2015-06-08T11:13:36Z","git_url":"git://github.com/openfarmcc/OpenFarm.git","ssh_url":"git@github.com:openfarmcc/OpenFarm.git","clone_url":"https://github.com/openfarmcc/OpenFarm.git","svn_url":"https://github.com/openfarmcc/OpenFarm","homepage":"https://OpenFarm.cc","size":76941,"stargazers_count":254,"watchers_count":254,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":67,"mirror_url":null,"open_issues_count":66,"forks":67,"open_issues":66,"watchers":254,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/646"},"html":{"href":"https://github.com/openfarmcc/OpenFarm/pull/646"},"issue":{"href":"https://api.github.com/repos/openfarmcc/OpenFarm/issues/646"},"comments":{"href":"https://api.github.com/repos/openfarmcc/OpenFarm/issues/646/comments"},"review_comments":{"href":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/646/comments"},"review_comment":{"href":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/646/commits"},"statuses":{"href":"https://api.github.com/repos/openfarmcc/OpenFarm/statuses/53981add622be263f75db823fdf191af6a28d314"}}}}