{"action":"created","comment":{"url":"https://api.github.com/repos/fsek/web/pulls/comments/26272185","id":26272185,"diff_hunk":"@@ -0,0 +1,76 @@\n+class ConstantsController < ApplicationController\n+  before_action :login_required\n+  before_action :verify_admin\n+  before_action :set_constant, only: [:show, :edit, :update, :destroy]\n+\n+  # GET /constants\n+  # GET /constants.json\n+  def index\n+    @constants = Constant.all\n+  end\n+\n+  # GET /constants/1\n+  # GET /constants/1.json\n+  def show\n+  end\n+\n+  # GET /constants/new\n+  def new\n+    @constant = Constant.new\n+  end\n+\n+  # GET /constants/1/edit\n+  def edit\n+  end\n+\n+  # POST /constants\n+  # POST /constants.json\n+  def create\n+    @constant = Constant.new(constant_params)\n+\n+    respond_to do |format|\n+      if @constant.save\n+        format.html { redirect_to @constant, notice: 'Constant was successfully created.' }\n+        format.json { render action: 'show', status: :created, location: @constant }\n+      else\n+        format.html { render action: 'new' }\n+        format.json { render json: @constant.errors, status: :unprocessable_entity }\n+      end\n+    end\n+  end\n+\n+  # PATCH/PUT /constants/1\n+  # PATCH/PUT /constants/1.json\n+  def update\n+    respond_to do |format|\n+      if @constant.update(constant_params)\n+        format.html { redirect_to @constant, notice: 'Constant was successfully updated.' }\n+        format.json { head :no_content }\n+      else\n+        format.html { render action: 'edit' }\n+        format.json { render json: @constant.errors, status: :unprocessable_entity }","path":"app/controllers/constants_controller.rb","position":51,"original_position":51,"commit_id":"0c20b7eed06ebaae212183608513a9d422cc79c5","original_commit_id":"0c20b7eed06ebaae212183608513a9d422cc79c5","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":"Line is too long. [84/80]","created_at":"2015-03-12T01:28:32Z","updated_at":"2015-03-12T01:28:32Z","html_url":"https://github.com/fsek/web/pull/42#discussion_r26272185","pull_request_url":"https://api.github.com/repos/fsek/web/pulls/42","_links":{"self":{"href":"https://api.github.com/repos/fsek/web/pulls/comments/26272185"},"html":{"href":"https://github.com/fsek/web/pull/42#discussion_r26272185"},"pull_request":{"href":"https://api.github.com/repos/fsek/web/pulls/42"}}},"pull_request":{"url":"https://api.github.com/repos/fsek/web/pulls/42","id":31001394,"html_url":"https://github.com/fsek/web/pull/42","diff_url":"https://github.com/fsek/web/pull/42.diff","patch_url":"https://github.com/fsek/web/pull/42.patch","issue_url":"https://api.github.com/repos/fsek/web/issues/42","number":42,"state":"open","locked":false,"title":"Added a model for holding app constants","user":{"login":"henrikssn","id":859779,"avatar_url":"https://avatars.githubusercontent.com/u/859779?v=3","gravatar_id":"","url":"https://api.github.com/users/henrikssn","html_url":"https://github.com/henrikssn","followers_url":"https://api.github.com/users/henrikssn/followers","following_url":"https://api.github.com/users/henrikssn/following{/other_user}","gists_url":"https://api.github.com/users/henrikssn/gists{/gist_id}","starred_url":"https://api.github.com/users/henrikssn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henrikssn/subscriptions","organizations_url":"https://api.github.com/users/henrikssn/orgs","repos_url":"https://api.github.com/users/henrikssn/repos","events_url":"https://api.github.com/users/henrikssn/events{/privacy}","received_events_url":"https://api.github.com/users/henrikssn/received_events","type":"User","site_admin":false},"body":"Here we will put stuff we do not want on github. I.e. devise secret and github webhooks secret.\r\n\r\nYou get the `foo` constant by `Constant.get :foo`","created_at":"2015-03-12T01:28:22Z","updated_at":"2015-03-12T01:28:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4b743fc162c1593f5683a55cfdd62894cde269db","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fsek/web/pulls/42/commits","review_comments_url":"https://api.github.com/repos/fsek/web/pulls/42/comments","review_comment_url":"https://api.github.com/repos/fsek/web/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fsek/web/issues/42/comments","statuses_url":"https://api.github.com/repos/fsek/web/statuses/0c20b7eed06ebaae212183608513a9d422cc79c5","head":{"label":"fsek:constants","ref":"constants","sha":"0c20b7eed06ebaae212183608513a9d422cc79c5","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-11T21:46:05Z","pushed_at":"2015-03-12T01:22:52Z","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":27,"forks":0,"open_issues":27,"watchers":1,"default_branch":"master"}},"base":{"label":"fsek:master","ref":"master","sha":"32acf1baf22451b333935506503b91cb32c86346","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-11T21:46:05Z","pushed_at":"2015-03-12T01:22:52Z","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":27,"forks":0,"open_issues":27,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fsek/web/pulls/42"},"html":{"href":"https://github.com/fsek/web/pull/42"},"issue":{"href":"https://api.github.com/repos/fsek/web/issues/42"},"comments":{"href":"https://api.github.com/repos/fsek/web/issues/42/comments"},"review_comments":{"href":"https://api.github.com/repos/fsek/web/pulls/42/comments"},"review_comment":{"href":"https://api.github.com/repos/fsek/web/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fsek/web/pulls/42/commits"},"statuses":{"href":"https://api.github.com/repos/fsek/web/statuses/0c20b7eed06ebaae212183608513a9d422cc79c5"}}}}