[Sdruby] naming controllers

Chris Abad chris at integralimpressions.com
Fri Feb 23 20:40:51 GMT 2007


RESTful convention is this:
Table: plural
Controller: plural
Model: singular

So for example:

table: apples
controller: ApplesController
model: Apple

On Feb 23, 2007, at 12:37 PM, Javan Makhmali wrote:

> I'm pretty new to rails, and am a little confused about the proper  
> naming convention for controllers. The 2nd edition of the Agile  
> books says to name them singularly. So, for my 'items' table I  
> would have an item_controller.rb file containing an ItemController  
> class.
>
> However, running 'script/generate scaffold item' generates an  
> items_controller.rb file with an ItemsController class.
>
>
> _______________________________________________
> Sdruby mailing list
> Sdruby at lists.sdruby.com
> http://lists.sdruby.com/mailman/listinfo/sdruby

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://comox.textdrive.com/pipermail/sdruby/attachments/20070223/9b053243/attachment.htm


More information about the Sdruby mailing list