{"action":"created","comment":{"url":"https://api.github.com/repos/alphagov/hmrc-contacts/pulls/comments/22668516","id":22668516,"diff_hunk":"@@ -57,7 +57,11 @@\n   # config.cache_store = :mem_cache_store\n \n   # Enable serving of images, stylesheets, and JavaScripts from an asset server.\n-  config.action_controller.asset_host = ENV['GOVUK_ASSET_HOST']\n+  config.action_controller.asset_host = Proc.new do |source, request = nil, *_|","path":"config/environments/production.rb","position":null,"original_position":5,"commit_id":"380aa91e6a0925924405a305a7f494075ebb4bda","original_commit_id":"fb3aa352b8a9f76cb8d7a45e8dbf09b623212f4a","user":{"login":"jamiecobbett","id":93739,"avatar_url":"https://avatars.githubusercontent.com/u/93739?v=3","gravatar_id":"","url":"https://api.github.com/users/jamiecobbett","html_url":"https://github.com/jamiecobbett","followers_url":"https://api.github.com/users/jamiecobbett/followers","following_url":"https://api.github.com/users/jamiecobbett/following{/other_user}","gists_url":"https://api.github.com/users/jamiecobbett/gists{/gist_id}","starred_url":"https://api.github.com/users/jamiecobbett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamiecobbett/subscriptions","organizations_url":"https://api.github.com/users/jamiecobbett/orgs","repos_url":"https://api.github.com/users/jamiecobbett/repos","events_url":"https://api.github.com/users/jamiecobbett/events{/privacy}","received_events_url":"https://api.github.com/users/jamiecobbett/received_events","type":"User","site_admin":false},"body":"The source I link to in the commit comment explains that the second argument is apparently sometimes omitted:\r\n```\r\nrequest' is set to nil to accomodate the cases where asset_host is called in asset files (CSS and JS if you are using the asset helper tags).\r\n```\r\n\r\nI don't believe that we use asset helper tags - I successfully I precompiled assets in development (having first copied this code into `development.rb` so that it was executed).","created_at":"2015-01-08T18:04:51Z","updated_at":"2015-01-08T18:04:51Z","html_url":"https://github.com/alphagov/hmrc-contacts/pull/176#discussion_r22668516","pull_request_url":"https://api.github.com/repos/alphagov/hmrc-contacts/pulls/176","_links":{"self":{"href":"https://api.github.com/repos/alphagov/hmrc-contacts/pulls/comments/22668516"},"html":{"href":"https://github.com/alphagov/hmrc-contacts/pull/176#discussion_r22668516"},"pull_request":{"href":"https://api.github.com/repos/alphagov/hmrc-contacts/pulls/176"}}},"pull_request":{"url":"https://api.github.com/repos/alphagov/hmrc-contacts/pulls/176","id":27033009,"html_url":"https://github.com/alphagov/hmrc-contacts/pull/176","diff_url":"https://github.com/alphagov/hmrc-contacts/pull/176.diff","patch_url":"https://github.com/alphagov/hmrc-contacts/pull/176.patch","issue_url":"https://api.github.com/repos/alphagov/hmrc-contacts/issues/176","number":176,"state":"open","locked":false,"title":"Fix broken frontend assets","user":{"login":"jamiecobbett","id":93739,"avatar_url":"https://avatars.githubusercontent.com/u/93739?v=3","gravatar_id":"","url":"https://api.github.com/users/jamiecobbett","html_url":"https://github.com/jamiecobbett","followers_url":"https://api.github.com/users/jamiecobbett/followers","following_url":"https://api.github.com/users/jamiecobbett/following{/other_user}","gists_url":"https://api.github.com/users/jamiecobbett/gists{/gist_id}","starred_url":"https://api.github.com/users/jamiecobbett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamiecobbett/subscriptions","organizations_url":"https://api.github.com/users/jamiecobbett/orgs","repos_url":"https://api.github.com/users/jamiecobbett/repos","events_url":"https://api.github.com/users/jamiecobbett/events{/privacy}","received_events_url":"https://api.github.com/users/jamiecobbett/received_events","type":"User","site_admin":false},"body":"Setting the asset_host to nil in the admin controller was intended to only\r\napply to admin, but actually applied to frontend too. This meant that in\r\nproduction-like environments, the links to stylesheets didn't work.\r\n\r\nI copied the technique from here:\r\nhttp://stackoverflow.com/a/10252239","created_at":"2015-01-08T14:53:04Z","updated_at":"2015-01-08T18:04:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9115a84fb83de02cd8c7ac80b1fbe3db4741e4c7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/hmrc-contacts/pulls/176/commits","review_comments_url":"https://api.github.com/repos/alphagov/hmrc-contacts/pulls/176/comments","review_comment_url":"https://api.github.com/repos/alphagov/hmrc-contacts/pulls/comments/{number}","comments_url":"https://api.github.com/repos/alphagov/hmrc-contacts/issues/176/comments","statuses_url":"https://api.github.com/repos/alphagov/hmrc-contacts/statuses/380aa91e6a0925924405a305a7f494075ebb4bda","head":{"label":"alphagov:fix_broken_frontend_assets","ref":"fix_broken_frontend_assets","sha":"380aa91e6a0925924405a305a7f494075ebb4bda","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":12083840,"name":"hmrc-contacts","full_name":"alphagov/hmrc-contacts","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/hmrc-contacts","description":"Admin app to Publish contact information on GOV.UK","fork":false,"url":"https://api.github.com/repos/alphagov/hmrc-contacts","forks_url":"https://api.github.com/repos/alphagov/hmrc-contacts/forks","keys_url":"https://api.github.com/repos/alphagov/hmrc-contacts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/hmrc-contacts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/hmrc-contacts/teams","hooks_url":"https://api.github.com/repos/alphagov/hmrc-contacts/hooks","issue_events_url":"https://api.github.com/repos/alphagov/hmrc-contacts/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/hmrc-contacts/events","assignees_url":"https://api.github.com/repos/alphagov/hmrc-contacts/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/hmrc-contacts/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/hmrc-contacts/tags","blobs_url":"https://api.github.com/repos/alphagov/hmrc-contacts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/hmrc-contacts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/hmrc-contacts/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/hmrc-contacts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/hmrc-contacts/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/hmrc-contacts/languages","stargazers_url":"https://api.github.com/repos/alphagov/hmrc-contacts/stargazers","contributors_url":"https://api.github.com/repos/alphagov/hmrc-contacts/contributors","subscribers_url":"https://api.github.com/repos/alphagov/hmrc-contacts/subscribers","subscription_url":"https://api.github.com/repos/alphagov/hmrc-contacts/subscription","commits_url":"https://api.github.com/repos/alphagov/hmrc-contacts/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/hmrc-contacts/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/hmrc-contacts/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/hmrc-contacts/issues/comments/{number}","contents_url":"https://api.github.com/repos/alphagov/hmrc-contacts/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/hmrc-contacts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/hmrc-contacts/merges","archive_url":"https://api.github.com/repos/alphagov/hmrc-contacts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/hmrc-contacts/downloads","issues_url":"https://api.github.com/repos/alphagov/hmrc-contacts/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/hmrc-contacts/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/hmrc-contacts/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/hmrc-contacts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/hmrc-contacts/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/hmrc-contacts/releases{/id}","created_at":"2013-08-13T14:27:29Z","updated_at":"2015-01-08T17:07:30Z","pushed_at":"2015-01-08T17:58:18Z","git_url":"git://github.com/alphagov/hmrc-contacts.git","ssh_url":"git@github.com:alphagov/hmrc-contacts.git","clone_url":"https://github.com/alphagov/hmrc-contacts.git","svn_url":"https://github.com/alphagov/hmrc-contacts","homepage":"https://www.gov.uk/government/organisations/hm-revenue-customs/contact","size":51834,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":2,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"5429a0e6d37ca72a95c7073f3585674f2ffb2425","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":12083840,"name":"hmrc-contacts","full_name":"alphagov/hmrc-contacts","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/hmrc-contacts","description":"Admin app to Publish contact information on GOV.UK","fork":false,"url":"https://api.github.com/repos/alphagov/hmrc-contacts","forks_url":"https://api.github.com/repos/alphagov/hmrc-contacts/forks","keys_url":"https://api.github.com/repos/alphagov/hmrc-contacts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/hmrc-contacts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/hmrc-contacts/teams","hooks_url":"https://api.github.com/repos/alphagov/hmrc-contacts/hooks","issue_events_url":"https://api.github.com/repos/alphagov/hmrc-contacts/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/hmrc-contacts/events","assignees_url":"https://api.github.com/repos/alphagov/hmrc-contacts/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/hmrc-contacts/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/hmrc-contacts/tags","blobs_url":"https://api.github.com/repos/alphagov/hmrc-contacts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/hmrc-contacts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/hmrc-contacts/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/hmrc-contacts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/hmrc-contacts/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/hmrc-contacts/languages","stargazers_url":"https://api.github.com/repos/alphagov/hmrc-contacts/stargazers","contributors_url":"https://api.github.com/repos/alphagov/hmrc-contacts/contributors","subscribers_url":"https://api.github.com/repos/alphagov/hmrc-contacts/subscribers","subscription_url":"https://api.github.com/repos/alphagov/hmrc-contacts/subscription","commits_url":"https://api.github.com/repos/alphagov/hmrc-contacts/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/hmrc-contacts/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/hmrc-contacts/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/hmrc-contacts/issues/comments/{number}","contents_url":"https://api.github.com/repos/alphagov/hmrc-contacts/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/hmrc-contacts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/hmrc-contacts/merges","archive_url":"https://api.github.com/repos/alphagov/hmrc-contacts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/hmrc-contacts/downloads","issues_url":"https://api.github.com/repos/alphagov/hmrc-contacts/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/hmrc-contacts/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/hmrc-contacts/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/hmrc-contacts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/hmrc-contacts/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/hmrc-contacts/releases{/id}","created_at":"2013-08-13T14:27:29Z","updated_at":"2015-01-08T17:07:30Z","pushed_at":"2015-01-08T17:58:18Z","git_url":"git://github.com/alphagov/hmrc-contacts.git","ssh_url":"git@github.com:alphagov/hmrc-contacts.git","clone_url":"https://github.com/alphagov/hmrc-contacts.git","svn_url":"https://github.com/alphagov/hmrc-contacts","homepage":"https://www.gov.uk/government/organisations/hm-revenue-customs/contact","size":51834,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/hmrc-contacts/pulls/176"},"html":{"href":"https://github.com/alphagov/hmrc-contacts/pull/176"},"issue":{"href":"https://api.github.com/repos/alphagov/hmrc-contacts/issues/176"},"comments":{"href":"https://api.github.com/repos/alphagov/hmrc-contacts/issues/176/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/hmrc-contacts/pulls/176/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/hmrc-contacts/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/alphagov/hmrc-contacts/pulls/176/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/hmrc-contacts/statuses/380aa91e6a0925924405a305a7f494075ebb4bda"}}}}