{"action":"created","comment":{"url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/pulls/comments/174795866","pull_request_review_id":104214954,"id":174795866,"diff_hunk":"@@ -0,0 +1,66 @@\n+class TicketsController < ApplicationController\n+  protect_from_forgery with: :null_session\n+  after_action :set_points, only: :create\n+  def create\n+    @ticket = Ticket.create(selection_nested_params(ticket_params))\n+    if @ticket.save!\n+      redirect_to @ticket\n+    end\n+  end\n+\n+  def index\n+    @tickets = Ticket.all\n+  end\n+\n+  def show\n+    @ticket = Ticket.find(params[:id])\n+    @hash = Gmaps4rails.build_markers(@ticket.points) do |p, marker|\n+      marker.lat p.latitude\n+      marker.lng p.longitude\n+    end\n+    respond_to do |format|\n+      format.html\n+      format.json\n+    end\n+  end\n+\n+  private\n+\n+  def ticket_params\n+    params.require(:ticket).permit(:RequestNumber,\n+                                   :SequenceNumber,\n+                                   :RequestType,\n+                                   DateTimes: [ :ResponseDueDateTime ],\n+                                   ServiceArea: [ PrimaryServiceAreaCode: [ :SACode ],\n+                                                  AdditionalServiceAreaCodes: [ SACode: [] ] ],\n+                                   ExcavationInfo: [ DigsiteInfo: [ :WellKnownText ] ],\n+                                   Excavator: [ :CompanyName,\n+                                                :Address,\n+                                                :City,\n+                                                :State,\n+                                                :Zip,\n+                                                :Type,\n+                                                :CrewOnsite ])\n+  end\n+\n+  def set_points\n+    lats = @ticket.set_points_lat(@ticket.DigsiteInfo)\n+    lngs = @ticket.set_points_lng(@ticket.DigsiteInfo)\n+    for i in 0..lats.count","path":"app/controllers/tickets_controller.rb","position":49,"original_position":49,"commit_id":"22ab13b5c9a8dd10c976617309a43bfe62582a02","original_commit_id":"22ab13b5c9a8dd10c976617309a43bfe62582a02","user":{"login":"drkmen","id":4477953,"avatar_url":"https://avatars3.githubusercontent.com/u/4477953?v=4","gravatar_id":"","url":"https://api.github.com/users/drkmen","html_url":"https://github.com/drkmen","followers_url":"https://api.github.com/users/drkmen/followers","following_url":"https://api.github.com/users/drkmen/following{/other_user}","gists_url":"https://api.github.com/users/drkmen/gists{/gist_id}","starred_url":"https://api.github.com/users/drkmen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drkmen/subscriptions","organizations_url":"https://api.github.com/users/drkmen/orgs","repos_url":"https://api.github.com/users/drkmen/repos","events_url":"https://api.github.com/users/drkmen/events{/privacy}","received_events_url":"https://api.github.com/users/drkmen/received_events","type":"User","site_admin":false},"body":"lats.each ?","created_at":"2018-03-15T14:12:46Z","updated_at":"2018-03-15T14:18:07Z","html_url":"https://github.com/vladfreel/EndPointWithGmaps/pull/1#discussion_r174795866","pull_request_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/pulls/1","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/pulls/comments/174795866"},"html":{"href":"https://github.com/vladfreel/EndPointWithGmaps/pull/1#discussion_r174795866"},"pull_request":{"href":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/pulls/1","id":175245363,"html_url":"https://github.com/vladfreel/EndPointWithGmaps/pull/1","diff_url":"https://github.com/vladfreel/EndPointWithGmaps/pull/1.diff","patch_url":"https://github.com/vladfreel/EndPointWithGmaps/pull/1.patch","issue_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/issues/1","number":1,"state":"open","locked":false,"title":"Develop","user":{"login":"vladfreel","id":30240155,"avatar_url":"https://avatars2.githubusercontent.com/u/30240155?v=4","gravatar_id":"","url":"https://api.github.com/users/vladfreel","html_url":"https://github.com/vladfreel","followers_url":"https://api.github.com/users/vladfreel/followers","following_url":"https://api.github.com/users/vladfreel/following{/other_user}","gists_url":"https://api.github.com/users/vladfreel/gists{/gist_id}","starred_url":"https://api.github.com/users/vladfreel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladfreel/subscriptions","organizations_url":"https://api.github.com/users/vladfreel/orgs","repos_url":"https://api.github.com/users/vladfreel/repos","events_url":"https://api.github.com/users/vladfreel/events{/privacy}","received_events_url":"https://api.github.com/users/vladfreel/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-03-15T13:10:08Z","updated_at":"2018-03-15T14:18:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"191fa6fe9b4dd7e07b2e61c514b0969f9e5a5ea8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/pulls/1/commits","review_comments_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/pulls/1/comments","review_comment_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/issues/1/comments","statuses_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/statuses/22ab13b5c9a8dd10c976617309a43bfe62582a02","head":{"label":"vladfreel:develop","ref":"develop","sha":"22ab13b5c9a8dd10c976617309a43bfe62582a02","user":{"login":"vladfreel","id":30240155,"avatar_url":"https://avatars2.githubusercontent.com/u/30240155?v=4","gravatar_id":"","url":"https://api.github.com/users/vladfreel","html_url":"https://github.com/vladfreel","followers_url":"https://api.github.com/users/vladfreel/followers","following_url":"https://api.github.com/users/vladfreel/following{/other_user}","gists_url":"https://api.github.com/users/vladfreel/gists{/gist_id}","starred_url":"https://api.github.com/users/vladfreel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladfreel/subscriptions","organizations_url":"https://api.github.com/users/vladfreel/orgs","repos_url":"https://api.github.com/users/vladfreel/repos","events_url":"https://api.github.com/users/vladfreel/events{/privacy}","received_events_url":"https://api.github.com/users/vladfreel/received_events","type":"User","site_admin":false},"repo":{"id":125344104,"name":"EndPointWithGmaps","full_name":"vladfreel/EndPointWithGmaps","owner":{"login":"vladfreel","id":30240155,"avatar_url":"https://avatars2.githubusercontent.com/u/30240155?v=4","gravatar_id":"","url":"https://api.github.com/users/vladfreel","html_url":"https://github.com/vladfreel","followers_url":"https://api.github.com/users/vladfreel/followers","following_url":"https://api.github.com/users/vladfreel/following{/other_user}","gists_url":"https://api.github.com/users/vladfreel/gists{/gist_id}","starred_url":"https://api.github.com/users/vladfreel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladfreel/subscriptions","organizations_url":"https://api.github.com/users/vladfreel/orgs","repos_url":"https://api.github.com/users/vladfreel/repos","events_url":"https://api.github.com/users/vladfreel/events{/privacy}","received_events_url":"https://api.github.com/users/vladfreel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vladfreel/EndPointWithGmaps","description":null,"fork":false,"url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps","forks_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/forks","keys_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/teams","hooks_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/hooks","issue_events_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/issues/events{/number}","events_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/events","assignees_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/assignees{/user}","branches_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/branches{/branch}","tags_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/tags","blobs_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/git/refs{/sha}","trees_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/statuses/{sha}","languages_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/languages","stargazers_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/stargazers","contributors_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/contributors","subscribers_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/subscribers","subscription_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/subscription","commits_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/commits{/sha}","git_commits_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/git/commits{/sha}","comments_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/comments{/number}","issue_comment_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/issues/comments{/number}","contents_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/contents/{+path}","compare_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/merges","archive_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/downloads","issues_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/issues{/number}","pulls_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/pulls{/number}","milestones_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/milestones{/number}","notifications_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/labels{/name}","releases_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/releases{/id}","deployments_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/deployments","created_at":"2018-03-15T09:34:53Z","updated_at":"2018-03-15T09:39:31Z","pushed_at":"2018-03-15T13:10:09Z","git_url":"git://github.com/vladfreel/EndPointWithGmaps.git","ssh_url":"git@github.com:vladfreel/EndPointWithGmaps.git","clone_url":"https://github.com/vladfreel/EndPointWithGmaps.git","svn_url":"https://github.com/vladfreel/EndPointWithGmaps","homepage":null,"size":59,"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":"vladfreel:master","ref":"master","sha":"a360d84a8aeab6da1f860bd917b9eaaa0b9fd1e9","user":{"login":"vladfreel","id":30240155,"avatar_url":"https://avatars2.githubusercontent.com/u/30240155?v=4","gravatar_id":"","url":"https://api.github.com/users/vladfreel","html_url":"https://github.com/vladfreel","followers_url":"https://api.github.com/users/vladfreel/followers","following_url":"https://api.github.com/users/vladfreel/following{/other_user}","gists_url":"https://api.github.com/users/vladfreel/gists{/gist_id}","starred_url":"https://api.github.com/users/vladfreel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladfreel/subscriptions","organizations_url":"https://api.github.com/users/vladfreel/orgs","repos_url":"https://api.github.com/users/vladfreel/repos","events_url":"https://api.github.com/users/vladfreel/events{/privacy}","received_events_url":"https://api.github.com/users/vladfreel/received_events","type":"User","site_admin":false},"repo":{"id":125344104,"name":"EndPointWithGmaps","full_name":"vladfreel/EndPointWithGmaps","owner":{"login":"vladfreel","id":30240155,"avatar_url":"https://avatars2.githubusercontent.com/u/30240155?v=4","gravatar_id":"","url":"https://api.github.com/users/vladfreel","html_url":"https://github.com/vladfreel","followers_url":"https://api.github.com/users/vladfreel/followers","following_url":"https://api.github.com/users/vladfreel/following{/other_user}","gists_url":"https://api.github.com/users/vladfreel/gists{/gist_id}","starred_url":"https://api.github.com/users/vladfreel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladfreel/subscriptions","organizations_url":"https://api.github.com/users/vladfreel/orgs","repos_url":"https://api.github.com/users/vladfreel/repos","events_url":"https://api.github.com/users/vladfreel/events{/privacy}","received_events_url":"https://api.github.com/users/vladfreel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vladfreel/EndPointWithGmaps","description":null,"fork":false,"url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps","forks_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/forks","keys_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/teams","hooks_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/hooks","issue_events_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/issues/events{/number}","events_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/events","assignees_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/assignees{/user}","branches_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/branches{/branch}","tags_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/tags","blobs_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/git/refs{/sha}","trees_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/statuses/{sha}","languages_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/languages","stargazers_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/stargazers","contributors_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/contributors","subscribers_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/subscribers","subscription_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/subscription","commits_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/commits{/sha}","git_commits_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/git/commits{/sha}","comments_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/comments{/number}","issue_comment_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/issues/comments{/number}","contents_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/contents/{+path}","compare_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/merges","archive_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/downloads","issues_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/issues{/number}","pulls_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/pulls{/number}","milestones_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/milestones{/number}","notifications_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/labels{/name}","releases_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/releases{/id}","deployments_url":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/deployments","created_at":"2018-03-15T09:34:53Z","updated_at":"2018-03-15T09:39:31Z","pushed_at":"2018-03-15T13:10:09Z","git_url":"git://github.com/vladfreel/EndPointWithGmaps.git","ssh_url":"git@github.com:vladfreel/EndPointWithGmaps.git","clone_url":"https://github.com/vladfreel/EndPointWithGmaps.git","svn_url":"https://github.com/vladfreel/EndPointWithGmaps","homepage":null,"size":59,"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/vladfreel/EndPointWithGmaps/pulls/1"},"html":{"href":"https://github.com/vladfreel/EndPointWithGmaps/pull/1"},"issue":{"href":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/issues/1"},"comments":{"href":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/vladfreel/EndPointWithGmaps/statuses/22ab13b5c9a8dd10c976617309a43bfe62582a02"}},"author_association":"OWNER"}}
{"actor":{"display_login":"drkmen"}}