Most of the time, you will need to access different models across the app. And you would always access them with singular name with first letter uppercase'd like User
, Tweet
. Regarding controllers, I don't think so you would ever to access a controller from some other controller.
Remember, if are using raw SQL, and you want to access the table of a model, that would always be in plural and all lower case, like users
for User
, and tweets
for Tweet
.
Regarding routes, they are always accessed through lowercase words, and deciding whether singular or plural -- it depends upon the context.
If you are accessing all tweets, the route method will be tweets_path
, and if want one tweet, then tweet_path(1)
or edit_tweet_path(1)
where 1
being the id
of the tweet that you want to show or edit.
And for classes: everywhere in Rails, and generally speaking in Ruby, they would always be singular, and uppercase'd.