{"action":"created","issue":{"url":"https://api.github.com/repos/BathHacked/energy-sparks/issues/125","repository_url":"https://api.github.com/repos/BathHacked/energy-sparks","labels_url":"https://api.github.com/repos/BathHacked/energy-sparks/issues/125/labels{/name}","comments_url":"https://api.github.com/repos/BathHacked/energy-sparks/issues/125/comments","events_url":"https://api.github.com/repos/BathHacked/energy-sparks/issues/125/events","html_url":"https://github.com/BathHacked/energy-sparks/issues/125","id":194782161,"number":125,"title":"Merit causing server errors ","user":{"login":"ldodds","id":109082,"avatar_url":"https://avatars.githubusercontent.com/u/109082?v=3","gravatar_id":"","url":"https://api.github.com/users/ldodds","html_url":"https://github.com/ldodds","followers_url":"https://api.github.com/users/ldodds/followers","following_url":"https://api.github.com/users/ldodds/following{/other_user}","gists_url":"https://api.github.com/users/ldodds/gists{/gist_id}","starred_url":"https://api.github.com/users/ldodds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ldodds/subscriptions","organizations_url":"https://api.github.com/users/ldodds/orgs","repos_url":"https://api.github.com/users/ldodds/repos","events_url":"https://api.github.com/users/ldodds/events{/privacy}","received_events_url":"https://api.github.com/users/ldodds/received_events","type":"User","site_admin":false},"labels":[{"id":425787656,"url":"https://api.github.com/repos/BathHacked/energy-sparks/labels/1%20-%20Ready","name":"1 - Ready","color":"CCCCCC","default":false},{"id":425786909,"url":"https://api.github.com/repos/BathHacked/energy-sparks/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":{"login":"MattHelsby","id":8190470,"avatar_url":"https://avatars.githubusercontent.com/u/8190470?v=3","gravatar_id":"","url":"https://api.github.com/users/MattHelsby","html_url":"https://github.com/MattHelsby","followers_url":"https://api.github.com/users/MattHelsby/followers","following_url":"https://api.github.com/users/MattHelsby/following{/other_user}","gists_url":"https://api.github.com/users/MattHelsby/gists{/gist_id}","starred_url":"https://api.github.com/users/MattHelsby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MattHelsby/subscriptions","organizations_url":"https://api.github.com/users/MattHelsby/orgs","repos_url":"https://api.github.com/users/MattHelsby/repos","events_url":"https://api.github.com/users/MattHelsby/events{/privacy}","received_events_url":"https://api.github.com/users/MattHelsby/received_events","type":"User","site_admin":false},"assignees":[{"login":"MattHelsby","id":8190470,"avatar_url":"https://avatars.githubusercontent.com/u/8190470?v=3","gravatar_id":"","url":"https://api.github.com/users/MattHelsby","html_url":"https://github.com/MattHelsby","followers_url":"https://api.github.com/users/MattHelsby/followers","following_url":"https://api.github.com/users/MattHelsby/following{/other_user}","gists_url":"https://api.github.com/users/MattHelsby/gists{/gist_id}","starred_url":"https://api.github.com/users/MattHelsby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MattHelsby/subscriptions","organizations_url":"https://api.github.com/users/MattHelsby/orgs","repos_url":"https://api.github.com/users/MattHelsby/repos","events_url":"https://api.github.com/users/MattHelsby/events{/privacy}","received_events_url":"https://api.github.com/users/MattHelsby/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-12-10T17:54:25Z","updated_at":"2016-12-11T16:15:51Z","closed_at":null,"body":"I'm getting an intermittent error from the merit code. It manifests as an ActionController error:\r\n\r\n```\r\nundefined method `image' for #<Merit::Badge:0x007fd77af63d68>\r\n```\r\n\r\nObviously it only occurs for schools that have an achievement. Restarting the server fixes the error and the page displays.\r\n\r\nFrom in-browser error console:\r\n\r\n```\r\n>>  @school\r\n=> #<School id: 69, name: \"Twerton Infant School\", school_type: \"primary\", address: \"Poolemead Road\", postcode: \"BA2 1QR\", eco_school_status: \"silver\", website: \"www.twerton-infant-school.co.uk\", created_at: \"2016-12-10 14:58:30\", updated_at: \"2016-12-10 17:13:59\", enrolled: true, urn: 109007, sash_id: 69, level: 0, calendar_id: 66, slug: \"twerton-infant-school\">\r\n>>  @school.badges\r\n=> [#<Merit::Badge id: 5, name: \"eco-enrolled\", level: nil, description: \"Your school enrolled in the eco-school programme.\", custom_fields: {}>]\r\n```\r\n\r\nI'm trying to get to a 100% reliable recreation, but its happened when editing schools. Am not sure what triggers is.\r\n\r\n\r\n\r\n<!---\r\n@huboard:{\"order\":78.00780155999999,\"milestone_order\":125,\"custom_state\":\"\"}\n-->\r\n"},"comment":{"url":"https://api.github.com/repos/BathHacked/energy-sparks/issues/comments/266290822","html_url":"https://github.com/BathHacked/energy-sparks/issues/125#issuecomment-266290822","issue_url":"https://api.github.com/repos/BathHacked/energy-sparks/issues/125","id":266290822,"user":{"login":"ldodds","id":109082,"avatar_url":"https://avatars.githubusercontent.com/u/109082?v=3","gravatar_id":"","url":"https://api.github.com/users/ldodds","html_url":"https://github.com/ldodds","followers_url":"https://api.github.com/users/ldodds/followers","following_url":"https://api.github.com/users/ldodds/following{/other_user}","gists_url":"https://api.github.com/users/ldodds/gists{/gist_id}","starred_url":"https://api.github.com/users/ldodds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ldodds/subscriptions","organizations_url":"https://api.github.com/users/ldodds/orgs","repos_url":"https://api.github.com/users/ldodds/repos","events_url":"https://api.github.com/users/ldodds/events{/privacy}","received_events_url":"https://api.github.com/users/ldodds/received_events","type":"User","site_admin":false},"created_at":"2016-12-11T16:15:51Z","updated_at":"2016-12-11T16:15:51Z","body":"Yep, here's a reliable way to reproduce:\r\n\r\n* In development environment go to a school with a badge\r\n* Make a change to any rails helper, e.g. add a new line to application_helper.rb\r\n* Hit reload on the school page, you'll get the error\r\n* Restart the server and its fine\r\n\r\nThis is probably unlikely to bite in production, although without knowing the root cause its difficult to say."}}
{"actor":{"display_login":"ldodds"}}