{"action":"created","comment":{"url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/pulls/comments/50398138","id":50398138,"diff_hunk":"@@ -41,12 +42,26 @@ function createHandler({ verb, schema, serializerOrRegistry, rawHandler, options\n   return handler;\n }\n \n+function getModelName(fullPath) {\n+  let path = fullPath.split('/');\n+  let lastPath;\n+  while (path.length > 0) {\n+    lastPath = path.splice(-1)[0];\n+    if (lastPath && lastPath !== ':id') {\n+      break;\n+    }\n+  }\n+  let modelName = dasherize(camelize(singularize(lastPath)));\n+  return modelName;\n+}\n+\n export default class RouteHandler {\n \n-  constructor({ schema, verb, rawHandler, customizedCode, options, serializerOrRegistry }) {\n+  constructor({ schema, verb, rawHandler, customizedCode, options, path, serializerOrRegistry }) {\n     this.verb = verb;\n     this.customizedCode = customizedCode;\n     this.serializerOrRegistry = serializerOrRegistry;\n+    rawHandler = rawHandler || getModelName(path);","path":"addon/route-handler.js","position":null,"original_position":31,"commit_id":"02c98b5d78a3e61605e3569aae996828ccd4eb09","original_commit_id":"b593e8e9934830e37ec8fb255ce52a7f2d82fc72","user":{"login":"bekzod","id":1131614,"avatar_url":"https://avatars.githubusercontent.com/u/1131614?v=3","gravatar_id":"","url":"https://api.github.com/users/bekzod","html_url":"https://github.com/bekzod","followers_url":"https://api.github.com/users/bekzod/followers","following_url":"https://api.github.com/users/bekzod/following{/other_user}","gists_url":"https://api.github.com/users/bekzod/gists{/gist_id}","starred_url":"https://api.github.com/users/bekzod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bekzod/subscriptions","organizations_url":"https://api.github.com/users/bekzod/orgs","repos_url":"https://api.github.com/users/bekzod/repos","events_url":"https://api.github.com/users/bekzod/events{/privacy}","received_events_url":"https://api.github.com/users/bekzod/received_events","type":"User","site_admin":false},"body":"Cool made those changes, I think all of them valid ","created_at":"2016-01-21T13:11:12Z","updated_at":"2016-01-21T13:11:12Z","html_url":"https://github.com/samselikoff/ember-cli-mirage/pull/500#discussion_r50398138","pull_request_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/pulls/500","_links":{"self":{"href":"https://api.github.com/repos/samselikoff/ember-cli-mirage/pulls/comments/50398138"},"html":{"href":"https://github.com/samselikoff/ember-cli-mirage/pull/500#discussion_r50398138"},"pull_request":{"href":"https://api.github.com/repos/samselikoff/ember-cli-mirage/pulls/500"}}},"pull_request":{"url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/pulls/500","id":55595383,"html_url":"https://github.com/samselikoff/ember-cli-mirage/pull/500","diff_url":"https://github.com/samselikoff/ember-cli-mirage/pull/500.diff","patch_url":"https://github.com/samselikoff/ember-cli-mirage/pull/500.patch","issue_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/500","number":500,"state":"open","locked":false,"title":"Shorthand refactor","user":{"login":"bekzod","id":1131614,"avatar_url":"https://avatars.githubusercontent.com/u/1131614?v=3","gravatar_id":"","url":"https://api.github.com/users/bekzod","html_url":"https://github.com/bekzod","followers_url":"https://api.github.com/users/bekzod/followers","following_url":"https://api.github.com/users/bekzod/following{/other_user}","gists_url":"https://api.github.com/users/bekzod/gists{/gist_id}","starred_url":"https://api.github.com/users/bekzod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bekzod/subscriptions","organizations_url":"https://api.github.com/users/bekzod/orgs","repos_url":"https://api.github.com/users/bekzod/repos","events_url":"https://api.github.com/users/bekzod/events{/privacy}","received_events_url":"https://api.github.com/users/bekzod/received_events","type":"User","site_admin":false},"body":"* identifying `modelName` from path not from request url\r\n* moved identifying `modelClass` to constructor","created_at":"2016-01-11T08:16:31Z","updated_at":"2016-01-21T13:11:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"57a339c42975d55c3e6d8b77f502debb067a76b5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/pulls/500/commits","review_comments_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/pulls/500/comments","review_comment_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/pulls/comments{/number}","comments_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/500/comments","statuses_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/statuses/02c98b5d78a3e61605e3569aae996828ccd4eb09","head":{"label":"bekzod:shorthand-refactor","ref":"shorthand-refactor","sha":"02c98b5d78a3e61605e3569aae996828ccd4eb09","user":{"login":"bekzod","id":1131614,"avatar_url":"https://avatars.githubusercontent.com/u/1131614?v=3","gravatar_id":"","url":"https://api.github.com/users/bekzod","html_url":"https://github.com/bekzod","followers_url":"https://api.github.com/users/bekzod/followers","following_url":"https://api.github.com/users/bekzod/following{/other_user}","gists_url":"https://api.github.com/users/bekzod/gists{/gist_id}","starred_url":"https://api.github.com/users/bekzod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bekzod/subscriptions","organizations_url":"https://api.github.com/users/bekzod/orgs","repos_url":"https://api.github.com/users/bekzod/repos","events_url":"https://api.github.com/users/bekzod/events{/privacy}","received_events_url":"https://api.github.com/users/bekzod/received_events","type":"User","site_admin":false},"repo":{"id":46262252,"name":"ember-cli-mirage","full_name":"bekzod/ember-cli-mirage","owner":{"login":"bekzod","id":1131614,"avatar_url":"https://avatars.githubusercontent.com/u/1131614?v=3","gravatar_id":"","url":"https://api.github.com/users/bekzod","html_url":"https://github.com/bekzod","followers_url":"https://api.github.com/users/bekzod/followers","following_url":"https://api.github.com/users/bekzod/following{/other_user}","gists_url":"https://api.github.com/users/bekzod/gists{/gist_id}","starred_url":"https://api.github.com/users/bekzod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bekzod/subscriptions","organizations_url":"https://api.github.com/users/bekzod/orgs","repos_url":"https://api.github.com/users/bekzod/repos","events_url":"https://api.github.com/users/bekzod/events{/privacy}","received_events_url":"https://api.github.com/users/bekzod/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bekzod/ember-cli-mirage","description":"A client-side mock server to develop, test and prototype your app","fork":true,"url":"https://api.github.com/repos/bekzod/ember-cli-mirage","forks_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/forks","keys_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/teams","hooks_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/hooks","issue_events_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/issues/events{/number}","events_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/events","assignees_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/assignees{/user}","branches_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/branches{/branch}","tags_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/tags","blobs_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/git/refs{/sha}","trees_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/statuses/{sha}","languages_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/languages","stargazers_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/stargazers","contributors_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/contributors","subscribers_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/subscribers","subscription_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/subscription","commits_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/commits{/sha}","git_commits_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/git/commits{/sha}","comments_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/comments{/number}","issue_comment_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/issues/comments{/number}","contents_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/contents/{+path}","compare_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/merges","archive_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/downloads","issues_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/issues{/number}","pulls_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/pulls{/number}","milestones_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/milestones{/number}","notifications_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/labels{/name}","releases_url":"https://api.github.com/repos/bekzod/ember-cli-mirage/releases{/id}","created_at":"2015-11-16T08:39:09Z","updated_at":"2015-11-16T08:39:10Z","pushed_at":"2016-01-21T13:10:08Z","git_url":"git://github.com/bekzod/ember-cli-mirage.git","ssh_url":"git@github.com:bekzod/ember-cli-mirage.git","clone_url":"https://github.com/bekzod/ember-cli-mirage.git","svn_url":"https://github.com/bekzod/ember-cli-mirage","homepage":"http://ember-cli-mirage.com/","size":995,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"samselikoff:master","ref":"master","sha":"7c93953eb7d3993f092a2e10e999cf93e33f2b85","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},"repo":{"id":29990778,"name":"ember-cli-mirage","full_name":"samselikoff/ember-cli-mirage","owner":{"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},"private":false,"html_url":"https://github.com/samselikoff/ember-cli-mirage","description":"A client-side mock server to develop, test and prototype your app","fork":false,"url":"https://api.github.com/repos/samselikoff/ember-cli-mirage","forks_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/forks","keys_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/teams","hooks_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/hooks","issue_events_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/events{/number}","events_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/events","assignees_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/assignees{/user}","branches_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/branches{/branch}","tags_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/tags","blobs_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/git/refs{/sha}","trees_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/statuses/{sha}","languages_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/languages","stargazers_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/stargazers","contributors_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/contributors","subscribers_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/subscribers","subscription_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/subscription","commits_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/commits{/sha}","git_commits_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/git/commits{/sha}","comments_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/comments{/number}","issue_comment_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/comments{/number}","contents_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/contents/{+path}","compare_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/merges","archive_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/downloads","issues_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues{/number}","pulls_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/pulls{/number}","milestones_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/milestones{/number}","notifications_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/labels{/name}","releases_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/releases{/id}","created_at":"2015-01-28T22:08:26Z","updated_at":"2016-01-21T12:30:53Z","pushed_at":"2016-01-21T13:10:08Z","git_url":"git://github.com/samselikoff/ember-cli-mirage.git","ssh_url":"git@github.com:samselikoff/ember-cli-mirage.git","clone_url":"https://github.com/samselikoff/ember-cli-mirage.git","svn_url":"https://github.com/samselikoff/ember-cli-mirage","homepage":"http://ember-cli-mirage.com/","size":1473,"stargazers_count":440,"watchers_count":440,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":121,"mirror_url":null,"open_issues_count":103,"forks":121,"open_issues":103,"watchers":440,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/samselikoff/ember-cli-mirage/pulls/500"},"html":{"href":"https://github.com/samselikoff/ember-cli-mirage/pull/500"},"issue":{"href":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/500"},"comments":{"href":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/500/comments"},"review_comments":{"href":"https://api.github.com/repos/samselikoff/ember-cli-mirage/pulls/500/comments"},"review_comment":{"href":"https://api.github.com/repos/samselikoff/ember-cli-mirage/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/samselikoff/ember-cli-mirage/pulls/500/commits"},"statuses":{"href":"https://api.github.com/repos/samselikoff/ember-cli-mirage/statuses/02c98b5d78a3e61605e3569aae996828ccd4eb09"}}}}