Name | Singular/Plural | Use |
---|---|---|
Controller | Plural | rails g controller Users index show |
Helper | Plural | rails g helper Users |
Mailer | Singular | rails g mailer UserMailer |
Migration | Plural | rails g migration AddEmailToUsers email:string |
Model | Singular | rails g model User name:string |
Observer | Singular | rails g observer User |
Resource | Plural* | resources :users, :only => [:index, :show] |
Scaffold | Singular | rails g scaffold User name:string |
Table | Plural | SELECT * FROM users; |
View | N/A | app/views/users/index.html.erb – comprised of controller (plural) and action (singular) |
Last active
July 24, 2018 03:53
-
-
Save SunDi3yansyah/03b71d2123d2f94d6e6ca327bbe88cd2 to your computer and use it in GitHub Desktop.
Rails Conventions - Singular or Plural?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment