ember-tools
ember-tools copied to clipboard
scaffold for singular resource creates pluralized route file
Scaffolding a blog resource creates a blogs_route.js file. Why isn't it named blog_route.js instead? What, then, should the filename for a blogs route be called?
Example scaffolding code: ember generate --scaffold blog title:string content:text ember generate --route blogs
How about post?
Feel free to rename things.
On Saturday, July 20, 2013, Dan W. wrote:
Scaffolding a blog resource creates a blogs_route.js file. Why isn't it named blog_route.js instead? What, then, should the filename for a * blogs* route be called?
Example scaffolding code: ember generate --scaffold blog title:string content:text ember generate --route blogs
— Reply to this email directly or view it on GitHubhttps://github.com/rpflorence/ember-tools/issues/75 .
Ok. Assume this:
ember generate --scaffold post title:string
The created files include post_controller.js, post.js, post.hbs, posts.hbs and posts_controller.js. It's not a problem to rename a file, but I am curious whether there is a particular reason why PostRoute lives in posts_route.js? It doesn't seem consistent. Also, if I get a posts template, why not also a PostsRoute and a PostsController?