{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/webmaker-app/issues/1214","labels_url":"https://api.github.com/repos/mozilla/webmaker-app/issues/1214/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/webmaker-app/issues/1214/comments","events_url":"https://api.github.com/repos/mozilla/webmaker-app/issues/1214/events","html_url":"https://github.com/mozilla/webmaker-app/issues/1214","id":58116143,"number":1214,"title":"fix up model.js","user":{"login":"Pomax","id":177243,"avatar_url":"https://avatars.githubusercontent.com/u/177243?v=3","gravatar_id":"","url":"https://api.github.com/users/Pomax","html_url":"https://github.com/Pomax","followers_url":"https://api.github.com/users/Pomax/followers","following_url":"https://api.github.com/users/Pomax/following{/other_user}","gists_url":"https://api.github.com/users/Pomax/gists{/gist_id}","starred_url":"https://api.github.com/users/Pomax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pomax/subscriptions","organizations_url":"https://api.github.com/users/Pomax/orgs","repos_url":"https://api.github.com/users/Pomax/repos","events_url":"https://api.github.com/users/Pomax/events{/privacy}","received_events_url":"https://api.github.com/users/Pomax/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mozilla/webmaker-app/labels/enhancement","name":"enhancement","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/mozilla/webmaker-app/milestones/29","labels_url":"https://api.github.com/repos/mozilla/webmaker-app/milestones/29/labels","id":922639,"number":29,"title":"Tech","description":"Improving Webmaker App's tech, with a focus on:\r\n- Performance / responsiveness\r\n- Good offline experience\r\n- Efficient and conservative use of data\r\n- Normalization with MOFOs engineering handbook","creator":{"login":"k88hudson","id":1455535,"avatar_url":"https://avatars.githubusercontent.com/u/1455535?v=3","gravatar_id":"","url":"https://api.github.com/users/k88hudson","html_url":"https://github.com/k88hudson","followers_url":"https://api.github.com/users/k88hudson/followers","following_url":"https://api.github.com/users/k88hudson/following{/other_user}","gists_url":"https://api.github.com/users/k88hudson/gists{/gist_id}","starred_url":"https://api.github.com/users/k88hudson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k88hudson/subscriptions","organizations_url":"https://api.github.com/users/k88hudson/orgs","repos_url":"https://api.github.com/users/k88hudson/repos","events_url":"https://api.github.com/users/k88hudson/events{/privacy}","received_events_url":"https://api.github.com/users/k88hudson/received_events","type":"User","site_admin":false},"open_issues":29,"closed_issues":6,"state":"open","created_at":"2015-01-05T19:14:33Z","updated_at":"2015-02-18T19:42:54Z","due_on":"2015-03-13T07:00:00Z","closed_at":null},"comments":1,"created_at":"2015-02-18T19:34:54Z","updated_at":"2015-02-18T19:43:00Z","closed_at":null,"body":"Mostly the https://github.com/mozilla/webmaker-app/blob/master/lib/model.js#L128 bit seems a little curious, it makes more sense to separate the \"creation\" from the \"getting the instance\" functionality, since the way it is now the function looks like it should be callable multipel times, with different options objects, but only the first ever request object will get bound.\r\n\r\n```\r\nvar singletonModel = false;\r\nmodule.exports = {\r\n  initialise: function(options) {\r\n    if (!singletonModel) {\r\n      singletonModel = new Model(options);\r\n    } else {\r\n      // update the properties for this model\r\n      singletonModel.rebind(options);\r\n    }\r\n  },\r\n  getModel: function() {\r\n   if (!singletonModel) {\r\n    this.initialise({});\r\n  }\r\n  return singletonModel;\r\n};\r\n```"},"comment":{"url":"https://api.github.com/repos/mozilla/webmaker-app/issues/comments/74933340","html_url":"https://github.com/mozilla/webmaker-app/issues/1214#issuecomment-74933340","issue_url":"https://api.github.com/repos/mozilla/webmaker-app/issues/1214","id":74933340,"user":{"login":"thisandagain","id":747641,"avatar_url":"https://avatars.githubusercontent.com/u/747641?v=3","gravatar_id":"","url":"https://api.github.com/users/thisandagain","html_url":"https://github.com/thisandagain","followers_url":"https://api.github.com/users/thisandagain/followers","following_url":"https://api.github.com/users/thisandagain/following{/other_user}","gists_url":"https://api.github.com/users/thisandagain/gists{/gist_id}","starred_url":"https://api.github.com/users/thisandagain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thisandagain/subscriptions","organizations_url":"https://api.github.com/users/thisandagain/orgs","repos_url":"https://api.github.com/users/thisandagain/repos","events_url":"https://api.github.com/users/thisandagain/events{/privacy}","received_events_url":"https://api.github.com/users/thisandagain/received_events","type":"User","site_admin":false},"created_at":"2015-02-18T19:43:00Z","updated_at":"2015-02-18T19:43:00Z","body":":+1: "}}