How Rails Controllers Should be Created? Should it be a verb, noun or an adjective?

Posted by Winston on Stack Overflow See other posts from Stack Overflow or by Winston
Published on 2010-03-26T04:11:48Z Indexed on 2010/03/26 4:23 UTC
Read the original article Hit count: 269

Filed under:
|
|

I need some advice, what is the rule of the thumb when creating Rails controllers names?

Should controller be all be verbs or a combination of nouns and verbs (or adjectives)?

This is the example provided on creating controllers in Rails,

./script/generate controller CreditCard open debit credit close # which is a combination of nouns and verbs (unless credit and debit is made into a verb)

However, if I create a scaffold, the default controller actions would be index, show, new, edit, update, destroy, which has 1 noun and all verb.

Should nouns and verbs be separated completely for sake of consistency also providing a clearer project goals? Or should I mix them together?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about controller