Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scaffold for singular resource creates pluralized route file #75

Open
dnwade opened this issue Jul 20, 2013 · 2 comments
Open

scaffold for singular resource creates pluralized route file #75

dnwade opened this issue Jul 20, 2013 · 2 comments

Comments

@dnwade
Copy link

dnwade commented Jul 20, 2013

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

@ryanflorence
Copy link
Owner

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//issues/75
.

@dnwade
Copy link
Author

dnwade commented Jul 21, 2013

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants