Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

rails naming conventions controller

Controller class names use CamelCase and have Controller as a suffix. 
The Controller suffix is always singular. 
The name of the resource is usually plural.

Controller actions use snake_case and usually match the standard route names Rails defines (index, show, new, create, edit, update, delete).

Controller files go in app/controllers/#{resource_name}_controller.rb.
Source by gist.github.com #
 
PREVIOUS NEXT
Tagged: #rails #naming #conventions #controller
ADD COMMENT
Topic
Name
4+3 =