Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


form for question ruby on rails

when i generate controller file i use rails generate controller user. but when i want to use form for, why do i need to put resources: users on routes.rb and why it has to be users instead of user, as i created user not users

thank you for your help, please help me to clarify this.

1 Answer

Chung Yau Jefferson Choi
Chung Yau Jefferson Choi
11,910 Points

We usually name the model as "User" in singular and name the controller as "users". Just a naming convention.

rails generate controller --help for more example.

thank you, now I see the reason behind it, so every time that i generate controller i have to generate name as plural, is it correct?