In MVC framworks (such as Ruby on Rails), does usually Model spell as singular and controller and vi

Posted by Jian Lin on Stack Overflow See other posts from Stack Overflow or by Jian Lin
Published on 2010-05-22T23:42:39Z Indexed on 2010/05/23 5:40 UTC
Read the original article Hit count: 221

Filed under:
|
|
|
|

I usually see Ruby on Rails books using

script/generate model Story name:string link:string

which is a singular Story, while when it is controller

script/generate controller Stories index

then the Story now is Stories, which is plural.

Is this a standard on Ruby on Rails? Is it true in other MVC frameworks too, like CakePHP, Symfony, Django, or TurboGears?

I see that in the book Rails Space, the controller is also called User, which is the same as the model name, and it is the only exception I see.

Update: also, when scaffold is done on Ruby on Rails, then automatically, the model is singular and the controller and view are both plural.

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about mvc