If you type,
rails g controller
you'll get detailed instructions and an example of how to do it correctly. Basically, you can use either CamelCase
or under_scored
and the result will be the same. under_scores
in file names and CamelCase
in class names.
As for the name, I'd personally use Comments
, unless you plan to have another type of comments in your app and want to use a different class name for them.
And finally the question whether you should use PostsComments
or PostComments
is more about the english language than Rails. I think the more correct way would be PostComments
, but I'm not a native speaker :)