{"action":"created","comment":{"url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/pulls/comments/23008945","id":23008945,"diff_hunk":"@@ -8,73 +8,49 @@ def new\n \n     @page_title = 'Make a claim to evict tenants: accelerated possession'\n \n-    @date_select_options = {\n-      order: [:day, :month, :year],\n-      with_css_classes: true,\n-      prompt: { day: 'Day', month: 'Month', year: 'Year' },\n-      start_year: Date.today.year,\n-      end_year: Tenancy::APPLICABLE_FROM_DATE.year\n-    }\n-    @claim = if !@production && params.has_key?(:journey)\n-      force_reload = params.has_key?(:reload)\n-\n-      require 'fixture_data'\n-      journey_id = params[:journey].to_i\n-      claim_data = FixtureData.data(force_reload).params_data_for(journey_id)\n-      Claim.new(HashWithIndifferentAccess.new(claim_data))\n-    elsif (data = session[:claim])\n-      Claim.new(data).tap { |claim|\n-        unless claim.valid?\n-          @errors = claim.errors\n-          @error_messages = claim.error_messages\n-        end\n-      }\n+    @date_select_options = get_date_select_options\n+\n+    @claim = if has_journey\n+      get_claim_for_journey\n+    elsif session[:claim]\n+      get_claim_from_session","path":"app/controllers/claim_controller.rb","position":30,"original_position":30,"commit_id":"3e1c3686c425bc99423b8873df3bff4479212c95","original_commit_id":"3e1c3686c425bc99423b8873df3bff4479212c95","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":"Use 2 (not -7) spaces for indentation.","created_at":"2015-01-15T13:32:14Z","updated_at":"2015-01-15T13:32:14Z","html_url":"https://github.com/ministryofjustice/accelerated_claims/pull/589#discussion_r23008945","pull_request_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/pulls/589","_links":{"self":{"href":"https://api.github.com/repos/ministryofjustice/accelerated_claims/pulls/comments/23008945"},"html":{"href":"https://github.com/ministryofjustice/accelerated_claims/pull/589#discussion_r23008945"},"pull_request":{"href":"https://api.github.com/repos/ministryofjustice/accelerated_claims/pulls/589"}}},"pull_request":{"url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/pulls/589","id":27427991,"html_url":"https://github.com/ministryofjustice/accelerated_claims/pull/589","diff_url":"https://github.com/ministryofjustice/accelerated_claims/pull/589.diff","patch_url":"https://github.com/ministryofjustice/accelerated_claims/pull/589.patch","issue_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/issues/589","number":589,"state":"open","locked":false,"title":"Refactoring","user":{"login":"colinbruce","id":6757677,"avatar_url":"https://avatars.githubusercontent.com/u/6757677?v=3","gravatar_id":"","url":"https://api.github.com/users/colinbruce","html_url":"https://github.com/colinbruce","followers_url":"https://api.github.com/users/colinbruce/followers","following_url":"https://api.github.com/users/colinbruce/following{/other_user}","gists_url":"https://api.github.com/users/colinbruce/gists{/gist_id}","starred_url":"https://api.github.com/users/colinbruce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colinbruce/subscriptions","organizations_url":"https://api.github.com/users/colinbruce/orgs","repos_url":"https://api.github.com/users/colinbruce/repos","events_url":"https://api.github.com/users/colinbruce/events{/privacy}","received_events_url":"https://api.github.com/users/colinbruce/received_events","type":"User","site_admin":false},"body":"To improve code-climate feedback, multiple changes to reduce complexity and duplication","created_at":"2015-01-15T13:27:58Z","updated_at":"2015-01-15T13:32:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e71aa5f87b5cdd471b61e530d4dad08f9bde964b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/pulls/589/commits","review_comments_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/pulls/589/comments","review_comment_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/issues/589/comments","statuses_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/statuses/3e1c3686c425bc99423b8873df3bff4479212c95","head":{"label":"ministryofjustice:code-climate","ref":"code-climate","sha":"3e1c3686c425bc99423b8873df3bff4479212c95","user":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"repo":{"id":16478131,"name":"accelerated_claims","full_name":"ministryofjustice/accelerated_claims","owner":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ministryofjustice/accelerated_claims","description":"Accelerated Claims app","fork":false,"url":"https://api.github.com/repos/ministryofjustice/accelerated_claims","forks_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/forks","keys_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/teams","hooks_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/hooks","issue_events_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/issues/events{/number}","events_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/events","assignees_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/assignees{/user}","branches_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/branches{/branch}","tags_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/tags","blobs_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/git/refs{/sha}","trees_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/statuses/{sha}","languages_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/languages","stargazers_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/stargazers","contributors_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/contributors","subscribers_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/subscribers","subscription_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/subscription","commits_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/commits{/sha}","git_commits_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/git/commits{/sha}","comments_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/comments{/number}","issue_comment_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/issues/comments/{number}","contents_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/contents/{+path}","compare_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/merges","archive_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/downloads","issues_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/issues{/number}","pulls_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/pulls{/number}","milestones_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/milestones{/number}","notifications_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/labels{/name}","releases_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/releases{/id}","created_at":"2014-02-03T11:56:45Z","updated_at":"2015-01-10T11:20:14Z","pushed_at":"2015-01-15T13:32:08Z","git_url":"git://github.com/ministryofjustice/accelerated_claims.git","ssh_url":"git@github.com:ministryofjustice/accelerated_claims.git","clone_url":"https://github.com/ministryofjustice/accelerated_claims.git","svn_url":"https://github.com/ministryofjustice/accelerated_claims","homepage":null,"size":42784,"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":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"base":{"label":"ministryofjustice:master","ref":"master","sha":"9df72536672aeeaacaefeb7a43f47e8528760949","user":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"repo":{"id":16478131,"name":"accelerated_claims","full_name":"ministryofjustice/accelerated_claims","owner":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ministryofjustice/accelerated_claims","description":"Accelerated Claims app","fork":false,"url":"https://api.github.com/repos/ministryofjustice/accelerated_claims","forks_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/forks","keys_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/teams","hooks_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/hooks","issue_events_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/issues/events{/number}","events_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/events","assignees_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/assignees{/user}","branches_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/branches{/branch}","tags_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/tags","blobs_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/git/refs{/sha}","trees_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/statuses/{sha}","languages_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/languages","stargazers_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/stargazers","contributors_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/contributors","subscribers_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/subscribers","subscription_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/subscription","commits_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/commits{/sha}","git_commits_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/git/commits{/sha}","comments_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/comments{/number}","issue_comment_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/issues/comments/{number}","contents_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/contents/{+path}","compare_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/merges","archive_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/downloads","issues_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/issues{/number}","pulls_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/pulls{/number}","milestones_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/milestones{/number}","notifications_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/labels{/name}","releases_url":"https://api.github.com/repos/ministryofjustice/accelerated_claims/releases{/id}","created_at":"2014-02-03T11:56:45Z","updated_at":"2015-01-10T11:20:14Z","pushed_at":"2015-01-15T13:32:08Z","git_url":"git://github.com/ministryofjustice/accelerated_claims.git","ssh_url":"git@github.com:ministryofjustice/accelerated_claims.git","clone_url":"https://github.com/ministryofjustice/accelerated_claims.git","svn_url":"https://github.com/ministryofjustice/accelerated_claims","homepage":null,"size":42784,"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":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ministryofjustice/accelerated_claims/pulls/589"},"html":{"href":"https://github.com/ministryofjustice/accelerated_claims/pull/589"},"issue":{"href":"https://api.github.com/repos/ministryofjustice/accelerated_claims/issues/589"},"comments":{"href":"https://api.github.com/repos/ministryofjustice/accelerated_claims/issues/589/comments"},"review_comments":{"href":"https://api.github.com/repos/ministryofjustice/accelerated_claims/pulls/589/comments"},"review_comment":{"href":"https://api.github.com/repos/ministryofjustice/accelerated_claims/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ministryofjustice/accelerated_claims/pulls/589/commits"},"statuses":{"href":"https://api.github.com/repos/ministryofjustice/accelerated_claims/statuses/3e1c3686c425bc99423b8873df3bff4479212c95"}}}}