ember-tools icon indicating copy to clipboard operation
ember-tools copied to clipboard

scaffold for singular resource creates pluralized route file

Open dnwade opened this issue 11 years ago • 2 comments

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

dnwade avatar Jul 20 '13 18:07 dnwade

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 .

ryanflorence avatar Jul 21 '13 00:07 ryanflorence

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?

dnwade avatar Jul 21 '13 03:07 dnwade