{"action":"created","issue":{"url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/123","labels_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/123/labels{/name}","comments_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/123/comments","events_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/123/events","html_url":"https://github.com/samselikoff/ember-cli-mirage/pull/123","id":76666922,"number":123,"title":"Coalesce find requests in get shorthand handlers","user":{"login":"cibernox","id":265339,"avatar_url":"https://avatars.githubusercontent.com/u/265339?v=3","gravatar_id":"","url":"https://api.github.com/users/cibernox","html_url":"https://github.com/cibernox","followers_url":"https://api.github.com/users/cibernox/followers","following_url":"https://api.github.com/users/cibernox/following{/other_user}","gists_url":"https://api.github.com/users/cibernox/gists{/gist_id}","starred_url":"https://api.github.com/users/cibernox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cibernox/subscriptions","organizations_url":"https://api.github.com/users/cibernox/orgs","repos_url":"https://api.github.com/users/cibernox/repos","events_url":"https://api.github.com/users/cibernox/events{/privacy}","received_events_url":"https://api.github.com/users/cibernox/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-05-15T09:31:43Z","updated_at":"2015-05-16T22:56:25Z","closed_at":"2015-05-16T22:04:26Z","pull_request":{"url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/pulls/123","html_url":"https://github.com/samselikoff/ember-cli-mirage/pull/123","diff_url":"https://github.com/samselikoff/ember-cli-mirage/pull/123.diff","patch_url":"https://github.com/samselikoff/ember-cli-mirage/pull/123.patch"},"body":"Now shorthand methods can receive a POJO with options, ignored by all\r\nshorthands except of the `get` one.\r\n\r\nThe `get` handler supports the `coalesce` option, which defaults to\r\nfalse. When enabled that option will make the shorthand method look for\r\nan `ids` attribute on the queryParams, and will return with a collection\r\ncontaining only the models with those ids.\r\n\r\nExamples:\r\n\r\n```js\r\nthis.get(\"/contacts\", { coalesce: true }); // \"/contacts?ids=1,3]\"\r\nthis.get(\"/friends\", \"users\", { coalesce: true }) // \"/friends?ids=2,4\"\r\n```"},"comment":{"url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/comments/102709567","html_url":"https://github.com/samselikoff/ember-cli-mirage/pull/123#issuecomment-102709567","issue_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/123","id":102709567,"user":{"login":"samselikoff","id":2922250,"avatar_url":"https://avatars.githubusercontent.com/u/2922250?v=3","gravatar_id":"","url":"https://api.github.com/users/samselikoff","html_url":"https://github.com/samselikoff","followers_url":"https://api.github.com/users/samselikoff/followers","following_url":"https://api.github.com/users/samselikoff/following{/other_user}","gists_url":"https://api.github.com/users/samselikoff/gists{/gist_id}","starred_url":"https://api.github.com/users/samselikoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samselikoff/subscriptions","organizations_url":"https://api.github.com/users/samselikoff/orgs","repos_url":"https://api.github.com/users/samselikoff/repos","events_url":"https://api.github.com/users/samselikoff/events{/privacy}","received_events_url":"https://api.github.com/users/samselikoff/received_events","type":"User","site_admin":false},"created_at":"2015-05-16T22:56:25Z","updated_at":"2015-05-16T22:56:25Z","body":"Hesitant, since now you could define endpoints that inherit this behavior but that your app actually doesn't use. I'm planning on adding an \"exporter\" that describes your Mirage api, so you could hand that off to a backend engineer. I wouldn't want that to show that a certain route needs to coalesce ids if it doesn't.\r\n\r\nI'll think more about this though. BTW could you gist your current project's mirage/config.js file? I'd just like to see some more real world examples."}}