DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Rails Scaffold Generator Name Methods

02.08.2010
| 3349 views |
  • submit to reddit
        // Useful when customizing your own scaffold generator
// 

eg. ./script/generate scaffold Scm::Orders

controller_plural_name__________________orders
controller_file_name____________________orders
controller_table_name___________________orders
controller_class_path___________________scm
controller_class_name___________________Scm::Orders
controller_file_path____________________scm/orders
controller_class_nesting________________Scm
controller_name_________________________Scm::Orders
controller_class_nesting_depth__________1
controller_underscore_name______________orders
controller_singular_name________________Order
name____________________________________Scm::Order
class_name______________________________Scm::Order
model_name______________________________Order
singular_name___________________________order
plural_name_____________________________orders
table_name______________________________scm_orders
class_path______________________________scm
file_path_______________________________scm/order
class_nesting___________________________Scm
class_nesting_depth_____________________1