{"action":"created","comment":{"url":"https://api.github.com/repos/adamhundley/the_pivot/pulls/comments/57917616","id":57917616,"diff_hunk":"@@ -15,17 +15,19 @@ def index\n     if params[:destination]\n       @properties = Property.search(params)\n       @location = find_location(params)\n-      @properties_geo_info = GeoProcessor.new(@properties).geo_info\n-      @geocoded_location = Geocoder.search(@location).first.data[\"geometry\"][\"location\"]\n+      @properties_geo_info = set_geo_info(@properties)\n+      @geocoded_location = set_geo_location(@location)\n+    elsif params[:location]\n+      @properties = Property.where(city: find_city(params))\n+      @location = find_location(params)\n+      @properties_geo_info = set_geo_info(@properties)\n+      @geocoded_location = set_geo_location(@location)\n     else\n       @properties = Property.limit(10)\n-      @properties_geo_info = GeoProcessor.new(@properties).geo_info\n+      @properties_geo_info = set_geo_info(@properties)","path":"app/controllers/properties_controller.rb","position":16,"original_position":16,"commit_id":"4db772b796d6e8d95fc6b89237e89307f808d780","original_commit_id":"4db772b796d6e8d95fc6b89237e89307f808d780","user":{"login":"Salvi6God","id":13465112,"avatar_url":"https://avatars.githubusercontent.com/u/13465112?v=3","gravatar_id":"","url":"https://api.github.com/users/Salvi6God","html_url":"https://github.com/Salvi6God","followers_url":"https://api.github.com/users/Salvi6God/followers","following_url":"https://api.github.com/users/Salvi6God/following{/other_user}","gists_url":"https://api.github.com/users/Salvi6God/gists{/gist_id}","starred_url":"https://api.github.com/users/Salvi6God/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Salvi6God/subscriptions","organizations_url":"https://api.github.com/users/Salvi6God/orgs","repos_url":"https://api.github.com/users/Salvi6God/repos","events_url":"https://api.github.com/users/Salvi6God/events{/privacy}","received_events_url":"https://api.github.com/users/Salvi6God/received_events","type":"User","site_admin":false},"body":"nice refactoring.","created_at":"2016-03-30T16:17:10Z","updated_at":"2016-03-30T16:17:10Z","html_url":"https://github.com/adamhundley/the_pivot/pull/119#discussion_r57917616","pull_request_url":"https://api.github.com/repos/adamhundley/the_pivot/pulls/119","_links":{"self":{"href":"https://api.github.com/repos/adamhundley/the_pivot/pulls/comments/57917616"},"html":{"href":"https://github.com/adamhundley/the_pivot/pull/119#discussion_r57917616"},"pull_request":{"href":"https://api.github.com/repos/adamhundley/the_pivot/pulls/119"}}},"pull_request":{"url":"https://api.github.com/repos/adamhundley/the_pivot/pulls/119","id":64655008,"html_url":"https://github.com/adamhundley/the_pivot/pull/119","diff_url":"https://github.com/adamhundley/the_pivot/pull/119.diff","patch_url":"https://github.com/adamhundley/the_pivot/pull/119.patch","issue_url":"https://api.github.com/repos/adamhundley/the_pivot/issues/119","number":119,"state":"open","locked":false,"title":"Link major city images to property index","user":{"login":"natevenn","id":8459012,"avatar_url":"https://avatars.githubusercontent.com/u/8459012?v=3","gravatar_id":"","url":"https://api.github.com/users/natevenn","html_url":"https://github.com/natevenn","followers_url":"https://api.github.com/users/natevenn/followers","following_url":"https://api.github.com/users/natevenn/following{/other_user}","gists_url":"https://api.github.com/users/natevenn/gists{/gist_id}","starred_url":"https://api.github.com/users/natevenn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natevenn/subscriptions","organizations_url":"https://api.github.com/users/natevenn/orgs","repos_url":"https://api.github.com/users/natevenn/repos","events_url":"https://api.github.com/users/natevenn/events{/privacy}","received_events_url":"https://api.github.com/users/natevenn/received_events","type":"User","site_admin":false},"body":"add link tag to featured cities and display on properties index\r\nrefactor index controller and add helper methods for geo info, geo location, and find_city\r\nadd helper methods for property index with conditionals that help to set the placeholders for the searchbar","created_at":"2016-03-30T16:15:56Z","updated_at":"2016-03-30T16:17:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2b6a81ecd21faeebc774b8a3eec8e21e625d5021","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/adamhundley/the_pivot/pulls/119/commits","review_comments_url":"https://api.github.com/repos/adamhundley/the_pivot/pulls/119/comments","review_comment_url":"https://api.github.com/repos/adamhundley/the_pivot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/adamhundley/the_pivot/issues/119/comments","statuses_url":"https://api.github.com/repos/adamhundley/the_pivot/statuses/4db772b796d6e8d95fc6b89237e89307f808d780","head":{"label":"adamhundley:link-major-city-images-to-property-index","ref":"link-major-city-images-to-property-index","sha":"4db772b796d6e8d95fc6b89237e89307f808d780","user":{"login":"adamhundley","id":11205612,"avatar_url":"https://avatars.githubusercontent.com/u/11205612?v=3","gravatar_id":"","url":"https://api.github.com/users/adamhundley","html_url":"https://github.com/adamhundley","followers_url":"https://api.github.com/users/adamhundley/followers","following_url":"https://api.github.com/users/adamhundley/following{/other_user}","gists_url":"https://api.github.com/users/adamhundley/gists{/gist_id}","starred_url":"https://api.github.com/users/adamhundley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamhundley/subscriptions","organizations_url":"https://api.github.com/users/adamhundley/orgs","repos_url":"https://api.github.com/users/adamhundley/repos","events_url":"https://api.github.com/users/adamhundley/events{/privacy}","received_events_url":"https://api.github.com/users/adamhundley/received_events","type":"User","site_admin":false},"repo":{"id":54410873,"name":"the_pivot","full_name":"adamhundley/the_pivot","owner":{"login":"adamhundley","id":11205612,"avatar_url":"https://avatars.githubusercontent.com/u/11205612?v=3","gravatar_id":"","url":"https://api.github.com/users/adamhundley","html_url":"https://github.com/adamhundley","followers_url":"https://api.github.com/users/adamhundley/followers","following_url":"https://api.github.com/users/adamhundley/following{/other_user}","gists_url":"https://api.github.com/users/adamhundley/gists{/gist_id}","starred_url":"https://api.github.com/users/adamhundley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamhundley/subscriptions","organizations_url":"https://api.github.com/users/adamhundley/orgs","repos_url":"https://api.github.com/users/adamhundley/repos","events_url":"https://api.github.com/users/adamhundley/events{/privacy}","received_events_url":"https://api.github.com/users/adamhundley/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/adamhundley/the_pivot","description":"","fork":false,"url":"https://api.github.com/repos/adamhundley/the_pivot","forks_url":"https://api.github.com/repos/adamhundley/the_pivot/forks","keys_url":"https://api.github.com/repos/adamhundley/the_pivot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adamhundley/the_pivot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adamhundley/the_pivot/teams","hooks_url":"https://api.github.com/repos/adamhundley/the_pivot/hooks","issue_events_url":"https://api.github.com/repos/adamhundley/the_pivot/issues/events{/number}","events_url":"https://api.github.com/repos/adamhundley/the_pivot/events","assignees_url":"https://api.github.com/repos/adamhundley/the_pivot/assignees{/user}","branches_url":"https://api.github.com/repos/adamhundley/the_pivot/branches{/branch}","tags_url":"https://api.github.com/repos/adamhundley/the_pivot/tags","blobs_url":"https://api.github.com/repos/adamhundley/the_pivot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adamhundley/the_pivot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adamhundley/the_pivot/git/refs{/sha}","trees_url":"https://api.github.com/repos/adamhundley/the_pivot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adamhundley/the_pivot/statuses/{sha}","languages_url":"https://api.github.com/repos/adamhundley/the_pivot/languages","stargazers_url":"https://api.github.com/repos/adamhundley/the_pivot/stargazers","contributors_url":"https://api.github.com/repos/adamhundley/the_pivot/contributors","subscribers_url":"https://api.github.com/repos/adamhundley/the_pivot/subscribers","subscription_url":"https://api.github.com/repos/adamhundley/the_pivot/subscription","commits_url":"https://api.github.com/repos/adamhundley/the_pivot/commits{/sha}","git_commits_url":"https://api.github.com/repos/adamhundley/the_pivot/git/commits{/sha}","comments_url":"https://api.github.com/repos/adamhundley/the_pivot/comments{/number}","issue_comment_url":"https://api.github.com/repos/adamhundley/the_pivot/issues/comments{/number}","contents_url":"https://api.github.com/repos/adamhundley/the_pivot/contents/{+path}","compare_url":"https://api.github.com/repos/adamhundley/the_pivot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adamhundley/the_pivot/merges","archive_url":"https://api.github.com/repos/adamhundley/the_pivot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adamhundley/the_pivot/downloads","issues_url":"https://api.github.com/repos/adamhundley/the_pivot/issues{/number}","pulls_url":"https://api.github.com/repos/adamhundley/the_pivot/pulls{/number}","milestones_url":"https://api.github.com/repos/adamhundley/the_pivot/milestones{/number}","notifications_url":"https://api.github.com/repos/adamhundley/the_pivot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adamhundley/the_pivot/labels{/name}","releases_url":"https://api.github.com/repos/adamhundley/the_pivot/releases{/id}","deployments_url":"https://api.github.com/repos/adamhundley/the_pivot/deployments","created_at":"2016-03-21T17:57:00Z","updated_at":"2016-03-21T18:01:54Z","pushed_at":"2016-03-30T16:15:57Z","git_url":"git://github.com/adamhundley/the_pivot.git","ssh_url":"git@github.com:adamhundley/the_pivot.git","clone_url":"https://github.com/adamhundley/the_pivot.git","svn_url":"https://github.com/adamhundley/the_pivot","homepage":null,"size":113031,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":34,"forks":2,"open_issues":34,"watchers":0,"default_branch":"master"}},"base":{"label":"adamhundley:master","ref":"master","sha":"f57d7d9546d38aeb4b7d33a21ead15e68b915357","user":{"login":"adamhundley","id":11205612,"avatar_url":"https://avatars.githubusercontent.com/u/11205612?v=3","gravatar_id":"","url":"https://api.github.com/users/adamhundley","html_url":"https://github.com/adamhundley","followers_url":"https://api.github.com/users/adamhundley/followers","following_url":"https://api.github.com/users/adamhundley/following{/other_user}","gists_url":"https://api.github.com/users/adamhundley/gists{/gist_id}","starred_url":"https://api.github.com/users/adamhundley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamhundley/subscriptions","organizations_url":"https://api.github.com/users/adamhundley/orgs","repos_url":"https://api.github.com/users/adamhundley/repos","events_url":"https://api.github.com/users/adamhundley/events{/privacy}","received_events_url":"https://api.github.com/users/adamhundley/received_events","type":"User","site_admin":false},"repo":{"id":54410873,"name":"the_pivot","full_name":"adamhundley/the_pivot","owner":{"login":"adamhundley","id":11205612,"avatar_url":"https://avatars.githubusercontent.com/u/11205612?v=3","gravatar_id":"","url":"https://api.github.com/users/adamhundley","html_url":"https://github.com/adamhundley","followers_url":"https://api.github.com/users/adamhundley/followers","following_url":"https://api.github.com/users/adamhundley/following{/other_user}","gists_url":"https://api.github.com/users/adamhundley/gists{/gist_id}","starred_url":"https://api.github.com/users/adamhundley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamhundley/subscriptions","organizations_url":"https://api.github.com/users/adamhundley/orgs","repos_url":"https://api.github.com/users/adamhundley/repos","events_url":"https://api.github.com/users/adamhundley/events{/privacy}","received_events_url":"https://api.github.com/users/adamhundley/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/adamhundley/the_pivot","description":"","fork":false,"url":"https://api.github.com/repos/adamhundley/the_pivot","forks_url":"https://api.github.com/repos/adamhundley/the_pivot/forks","keys_url":"https://api.github.com/repos/adamhundley/the_pivot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adamhundley/the_pivot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adamhundley/the_pivot/teams","hooks_url":"https://api.github.com/repos/adamhundley/the_pivot/hooks","issue_events_url":"https://api.github.com/repos/adamhundley/the_pivot/issues/events{/number}","events_url":"https://api.github.com/repos/adamhundley/the_pivot/events","assignees_url":"https://api.github.com/repos/adamhundley/the_pivot/assignees{/user}","branches_url":"https://api.github.com/repos/adamhundley/the_pivot/branches{/branch}","tags_url":"https://api.github.com/repos/adamhundley/the_pivot/tags","blobs_url":"https://api.github.com/repos/adamhundley/the_pivot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adamhundley/the_pivot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adamhundley/the_pivot/git/refs{/sha}","trees_url":"https://api.github.com/repos/adamhundley/the_pivot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adamhundley/the_pivot/statuses/{sha}","languages_url":"https://api.github.com/repos/adamhundley/the_pivot/languages","stargazers_url":"https://api.github.com/repos/adamhundley/the_pivot/stargazers","contributors_url":"https://api.github.com/repos/adamhundley/the_pivot/contributors","subscribers_url":"https://api.github.com/repos/adamhundley/the_pivot/subscribers","subscription_url":"https://api.github.com/repos/adamhundley/the_pivot/subscription","commits_url":"https://api.github.com/repos/adamhundley/the_pivot/commits{/sha}","git_commits_url":"https://api.github.com/repos/adamhundley/the_pivot/git/commits{/sha}","comments_url":"https://api.github.com/repos/adamhundley/the_pivot/comments{/number}","issue_comment_url":"https://api.github.com/repos/adamhundley/the_pivot/issues/comments{/number}","contents_url":"https://api.github.com/repos/adamhundley/the_pivot/contents/{+path}","compare_url":"https://api.github.com/repos/adamhundley/the_pivot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adamhundley/the_pivot/merges","archive_url":"https://api.github.com/repos/adamhundley/the_pivot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adamhundley/the_pivot/downloads","issues_url":"https://api.github.com/repos/adamhundley/the_pivot/issues{/number}","pulls_url":"https://api.github.com/repos/adamhundley/the_pivot/pulls{/number}","milestones_url":"https://api.github.com/repos/adamhundley/the_pivot/milestones{/number}","notifications_url":"https://api.github.com/repos/adamhundley/the_pivot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adamhundley/the_pivot/labels{/name}","releases_url":"https://api.github.com/repos/adamhundley/the_pivot/releases{/id}","deployments_url":"https://api.github.com/repos/adamhundley/the_pivot/deployments","created_at":"2016-03-21T17:57:00Z","updated_at":"2016-03-21T18:01:54Z","pushed_at":"2016-03-30T16:15:57Z","git_url":"git://github.com/adamhundley/the_pivot.git","ssh_url":"git@github.com:adamhundley/the_pivot.git","clone_url":"https://github.com/adamhundley/the_pivot.git","svn_url":"https://github.com/adamhundley/the_pivot","homepage":null,"size":113031,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":34,"forks":2,"open_issues":34,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/adamhundley/the_pivot/pulls/119"},"html":{"href":"https://github.com/adamhundley/the_pivot/pull/119"},"issue":{"href":"https://api.github.com/repos/adamhundley/the_pivot/issues/119"},"comments":{"href":"https://api.github.com/repos/adamhundley/the_pivot/issues/119/comments"},"review_comments":{"href":"https://api.github.com/repos/adamhundley/the_pivot/pulls/119/comments"},"review_comment":{"href":"https://api.github.com/repos/adamhundley/the_pivot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/adamhundley/the_pivot/pulls/119/commits"},"statuses":{"href":"https://api.github.com/repos/adamhundley/the_pivot/statuses/4db772b796d6e8d95fc6b89237e89307f808d780"}}}}