{"action":"created","comment":{"url":"https://api.github.com/repos/fsek/web/pulls/comments/26401986","id":26401986,"diff_hunk":"@@ -28,48 +29,30 @@ def edit\n       @profile = @rent.profile\n       @utskott = @rent.profile.car_councils\n     end\n-\n   end\n \n   def create\n     @rent = Rent.new_with_status(rent_params, current_user)\n-    respond_to do |format|\n-      if @rent.save\n-        if (current_user)\n-          format.html { redirect_to @rent, notice: 'Bokningen skapades!' }\n-        else\n-          format.html { redirect_to @rent, notice: 'Bokningen skapades, du ska ha fått ett mejl till angiven epostadress (möjligen i skräppost)!' }\n-        end\n-        format.json { render json: @rent, status: :created, location: @rent }\n-      else\n-        format.html { render action: \"new\" }\n-        format.json { render json: @rent.errors, status:  :unprocessable_entity }\n-      end\n-    end\n+    flash[:notice] = \"Bokningen skapades, skickat mailbekräftelse.\" if @rent.save\n+    respond_with @rent\n   end\n \n   def update\n-    respond_to do |format|\n-      if @rent.update_with_authorization(rent_params,current_user)\n-        format.html { redirect_to edit_rent_path(@rent), notice: 'Bokningen uppdaterades.' }\n-        format.json { render json: @rent, status: :created, location:  @rent }\n-      else\n-        format.html { render action: \"edit\"}\n-        format.json { render json: @rent.errors, status:  :unprocessable_entity }\n-      end\n+    if @rent.update_with_authorization(rent_params, current_user)\n+      flash[:notice] = 'Bokningen uppdaterades'\n+      redirect_to edit_rent_path(@rent)\n+    else\n+      render action: :edit\n     end\n   end\n \n   def destroy\n     @rent.destroy\n-    respond_to do |format|\n-      format.html { redirect_to :bil, notice: 'Bokningen raderades.' }\n-      format.json { head :no_content }\n-    end\n+    flash[:notice] = \"Bokningen raderades\"\n+    redirect_to :bil\n   end\n \n-\n-  # Index page available to logged in users.\n+# Index page available to logged in users.","path":"app/controllers/rents_controller.rb","position":73,"original_position":73,"commit_id":"1609f7eb234733800aadb0c58917319419f7f871","original_commit_id":"1609f7eb234733800aadb0c58917319419f7f871","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":"Incorrect indentation detected (column 0 instead of 2).","created_at":"2015-03-13T16:50:19Z","updated_at":"2015-03-13T16:50:19Z","html_url":"https://github.com/fsek/web/pull/49#discussion_r26401986","pull_request_url":"https://api.github.com/repos/fsek/web/pulls/49","_links":{"self":{"href":"https://api.github.com/repos/fsek/web/pulls/comments/26401986"},"html":{"href":"https://github.com/fsek/web/pull/49#discussion_r26401986"},"pull_request":{"href":"https://api.github.com/repos/fsek/web/pulls/49"}}},"pull_request":{"url":"https://api.github.com/repos/fsek/web/pulls/49","id":31143088,"html_url":"https://github.com/fsek/web/pull/49","diff_url":"https://github.com/fsek/web/pull/49.diff","patch_url":"https://github.com/fsek/web/pull/49.patch","issue_url":"https://api.github.com/repos/fsek/web/issues/49","number":49,"state":"open","locked":false,"title":"Refactoring Rent","user":{"login":"Zofz","id":6763624,"avatar_url":"https://avatars.githubusercontent.com/u/6763624?v=3","gravatar_id":"","url":"https://api.github.com/users/Zofz","html_url":"https://github.com/Zofz","followers_url":"https://api.github.com/users/Zofz/followers","following_url":"https://api.github.com/users/Zofz/following{/other_user}","gists_url":"https://api.github.com/users/Zofz/gists{/gist_id}","starred_url":"https://api.github.com/users/Zofz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zofz/subscriptions","organizations_url":"https://api.github.com/users/Zofz/orgs","repos_url":"https://api.github.com/users/Zofz/repos","events_url":"https://api.github.com/users/Zofz/events{/privacy}","received_events_url":"https://api.github.com/users/Zofz/received_events","type":"User","site_admin":false},"body":"Fixes controller and some views, also fixing update from admin-page","created_at":"2015-03-13T16:50:13Z","updated_at":"2015-03-13T16:50:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f95e2449f08b6684d8a75aba8c27b39d9c0ff1e8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fsek/web/pulls/49/commits","review_comments_url":"https://api.github.com/repos/fsek/web/pulls/49/comments","review_comment_url":"https://api.github.com/repos/fsek/web/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fsek/web/issues/49/comments","statuses_url":"https://api.github.com/repos/fsek/web/statuses/1609f7eb234733800aadb0c58917319419f7f871","head":{"label":"fsek:bilbokning","ref":"bilbokning","sha":"1609f7eb234733800aadb0c58917319419f7f871","user":{"login":"fsek","id":10084654,"avatar_url":"https://avatars.githubusercontent.com/u/10084654?v=3","gravatar_id":"","url":"https://api.github.com/users/fsek","html_url":"https://github.com/fsek","followers_url":"https://api.github.com/users/fsek/followers","following_url":"https://api.github.com/users/fsek/following{/other_user}","gists_url":"https://api.github.com/users/fsek/gists{/gist_id}","starred_url":"https://api.github.com/users/fsek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsek/subscriptions","organizations_url":"https://api.github.com/users/fsek/orgs","repos_url":"https://api.github.com/users/fsek/repos","events_url":"https://api.github.com/users/fsek/events{/privacy}","received_events_url":"https://api.github.com/users/fsek/received_events","type":"Organization","site_admin":false},"repo":{"id":27583674,"name":"web","full_name":"fsek/web","owner":{"login":"fsek","id":10084654,"avatar_url":"https://avatars.githubusercontent.com/u/10084654?v=3","gravatar_id":"","url":"https://api.github.com/users/fsek","html_url":"https://github.com/fsek","followers_url":"https://api.github.com/users/fsek/followers","following_url":"https://api.github.com/users/fsek/following{/other_user}","gists_url":"https://api.github.com/users/fsek/gists{/gist_id}","starred_url":"https://api.github.com/users/fsek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsek/subscriptions","organizations_url":"https://api.github.com/users/fsek/orgs","repos_url":"https://api.github.com/users/fsek/repos","events_url":"https://api.github.com/users/fsek/events{/privacy}","received_events_url":"https://api.github.com/users/fsek/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fsek/web","description":"F-sektionens hemsida","fork":false,"url":"https://api.github.com/repos/fsek/web","forks_url":"https://api.github.com/repos/fsek/web/forks","keys_url":"https://api.github.com/repos/fsek/web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fsek/web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fsek/web/teams","hooks_url":"https://api.github.com/repos/fsek/web/hooks","issue_events_url":"https://api.github.com/repos/fsek/web/issues/events{/number}","events_url":"https://api.github.com/repos/fsek/web/events","assignees_url":"https://api.github.com/repos/fsek/web/assignees{/user}","branches_url":"https://api.github.com/repos/fsek/web/branches{/branch}","tags_url":"https://api.github.com/repos/fsek/web/tags","blobs_url":"https://api.github.com/repos/fsek/web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fsek/web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fsek/web/git/refs{/sha}","trees_url":"https://api.github.com/repos/fsek/web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fsek/web/statuses/{sha}","languages_url":"https://api.github.com/repos/fsek/web/languages","stargazers_url":"https://api.github.com/repos/fsek/web/stargazers","contributors_url":"https://api.github.com/repos/fsek/web/contributors","subscribers_url":"https://api.github.com/repos/fsek/web/subscribers","subscription_url":"https://api.github.com/repos/fsek/web/subscription","commits_url":"https://api.github.com/repos/fsek/web/commits{/sha}","git_commits_url":"https://api.github.com/repos/fsek/web/git/commits{/sha}","comments_url":"https://api.github.com/repos/fsek/web/comments{/number}","issue_comment_url":"https://api.github.com/repos/fsek/web/issues/comments{/number}","contents_url":"https://api.github.com/repos/fsek/web/contents/{+path}","compare_url":"https://api.github.com/repos/fsek/web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fsek/web/merges","archive_url":"https://api.github.com/repos/fsek/web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fsek/web/downloads","issues_url":"https://api.github.com/repos/fsek/web/issues{/number}","pulls_url":"https://api.github.com/repos/fsek/web/pulls{/number}","milestones_url":"https://api.github.com/repos/fsek/web/milestones{/number}","notifications_url":"https://api.github.com/repos/fsek/web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fsek/web/labels{/name}","releases_url":"https://api.github.com/repos/fsek/web/releases{/id}","created_at":"2014-12-05T09:13:19Z","updated_at":"2015-03-13T11:56:39Z","pushed_at":"2015-03-13T16:49:09Z","git_url":"git://github.com/fsek/web.git","ssh_url":"git@github.com:fsek/web.git","clone_url":"https://github.com/fsek/web.git","svn_url":"https://github.com/fsek/web","homepage":"http://fsektionen.se","size":206243,"stargazers_count":1,"watchers_count":1,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":26,"forks":0,"open_issues":26,"watchers":1,"default_branch":"master"}},"base":{"label":"fsek:master","ref":"master","sha":"55b27b90a63c1720704c57adc7a55f9069a92562","user":{"login":"fsek","id":10084654,"avatar_url":"https://avatars.githubusercontent.com/u/10084654?v=3","gravatar_id":"","url":"https://api.github.com/users/fsek","html_url":"https://github.com/fsek","followers_url":"https://api.github.com/users/fsek/followers","following_url":"https://api.github.com/users/fsek/following{/other_user}","gists_url":"https://api.github.com/users/fsek/gists{/gist_id}","starred_url":"https://api.github.com/users/fsek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsek/subscriptions","organizations_url":"https://api.github.com/users/fsek/orgs","repos_url":"https://api.github.com/users/fsek/repos","events_url":"https://api.github.com/users/fsek/events{/privacy}","received_events_url":"https://api.github.com/users/fsek/received_events","type":"Organization","site_admin":false},"repo":{"id":27583674,"name":"web","full_name":"fsek/web","owner":{"login":"fsek","id":10084654,"avatar_url":"https://avatars.githubusercontent.com/u/10084654?v=3","gravatar_id":"","url":"https://api.github.com/users/fsek","html_url":"https://github.com/fsek","followers_url":"https://api.github.com/users/fsek/followers","following_url":"https://api.github.com/users/fsek/following{/other_user}","gists_url":"https://api.github.com/users/fsek/gists{/gist_id}","starred_url":"https://api.github.com/users/fsek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsek/subscriptions","organizations_url":"https://api.github.com/users/fsek/orgs","repos_url":"https://api.github.com/users/fsek/repos","events_url":"https://api.github.com/users/fsek/events{/privacy}","received_events_url":"https://api.github.com/users/fsek/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fsek/web","description":"F-sektionens hemsida","fork":false,"url":"https://api.github.com/repos/fsek/web","forks_url":"https://api.github.com/repos/fsek/web/forks","keys_url":"https://api.github.com/repos/fsek/web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fsek/web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fsek/web/teams","hooks_url":"https://api.github.com/repos/fsek/web/hooks","issue_events_url":"https://api.github.com/repos/fsek/web/issues/events{/number}","events_url":"https://api.github.com/repos/fsek/web/events","assignees_url":"https://api.github.com/repos/fsek/web/assignees{/user}","branches_url":"https://api.github.com/repos/fsek/web/branches{/branch}","tags_url":"https://api.github.com/repos/fsek/web/tags","blobs_url":"https://api.github.com/repos/fsek/web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fsek/web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fsek/web/git/refs{/sha}","trees_url":"https://api.github.com/repos/fsek/web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fsek/web/statuses/{sha}","languages_url":"https://api.github.com/repos/fsek/web/languages","stargazers_url":"https://api.github.com/repos/fsek/web/stargazers","contributors_url":"https://api.github.com/repos/fsek/web/contributors","subscribers_url":"https://api.github.com/repos/fsek/web/subscribers","subscription_url":"https://api.github.com/repos/fsek/web/subscription","commits_url":"https://api.github.com/repos/fsek/web/commits{/sha}","git_commits_url":"https://api.github.com/repos/fsek/web/git/commits{/sha}","comments_url":"https://api.github.com/repos/fsek/web/comments{/number}","issue_comment_url":"https://api.github.com/repos/fsek/web/issues/comments{/number}","contents_url":"https://api.github.com/repos/fsek/web/contents/{+path}","compare_url":"https://api.github.com/repos/fsek/web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fsek/web/merges","archive_url":"https://api.github.com/repos/fsek/web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fsek/web/downloads","issues_url":"https://api.github.com/repos/fsek/web/issues{/number}","pulls_url":"https://api.github.com/repos/fsek/web/pulls{/number}","milestones_url":"https://api.github.com/repos/fsek/web/milestones{/number}","notifications_url":"https://api.github.com/repos/fsek/web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fsek/web/labels{/name}","releases_url":"https://api.github.com/repos/fsek/web/releases{/id}","created_at":"2014-12-05T09:13:19Z","updated_at":"2015-03-13T11:56:39Z","pushed_at":"2015-03-13T16:49:09Z","git_url":"git://github.com/fsek/web.git","ssh_url":"git@github.com:fsek/web.git","clone_url":"https://github.com/fsek/web.git","svn_url":"https://github.com/fsek/web","homepage":"http://fsektionen.se","size":206243,"stargazers_count":1,"watchers_count":1,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":26,"forks":0,"open_issues":26,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fsek/web/pulls/49"},"html":{"href":"https://github.com/fsek/web/pull/49"},"issue":{"href":"https://api.github.com/repos/fsek/web/issues/49"},"comments":{"href":"https://api.github.com/repos/fsek/web/issues/49/comments"},"review_comments":{"href":"https://api.github.com/repos/fsek/web/pulls/49/comments"},"review_comment":{"href":"https://api.github.com/repos/fsek/web/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fsek/web/pulls/49/commits"},"statuses":{"href":"https://api.github.com/repos/fsek/web/statuses/1609f7eb234733800aadb0c58917319419f7f871"}}}}