Search
 
SCRIPT & CODE EXAMPLE
 

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.
Comment

PREVIOUS NEXT
Code Example
Ruby :: is there a way of changing the key of a hash 
Ruby :: rails validate email 
Ruby :: iterate over each key value in hash ruby 
Ruby :: ruby run bash command 
Ruby :: rails form_tag 
Ruby :: add column with default value in rails 
Ruby :: rails redirect_to with params 
Ruby :: ruby test is number 
Ruby :: ruby find method 
Ruby :: ruby array prepend vs unshift 
Ruby :: times ruby 
Ruby :: ruby debugger 
Ruby :: rails image tag data attribute 
Ruby :: rails add index specifc name 
Ruby :: what is ruby language used for 
Ruby :: What does inject in ruby do 
Ruby :: Rails public folder items not available in production 
Ruby :: ruby generate task 
Ruby :: ruby abs method 
Ruby :: stripe test keys 
Ruby :: ruby coding challenges 
Ruby :: string formattion ruby 
Ruby :: rails scope where not 
Ruby :: devise valid password 
Ruby :: rails convert euro to dollar 
Ruby :: how to comment out embedded ruby 
Ruby :: record count by month in rails 
Ruby :: redis localhost url 
R :: R p value star 
R :: why is correlation na in r 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =