Ruby on Rails / How to generate scaffold for existing model

If you'd like to generate a controller scaffold for your model, see scaffold_controller.

Description:
Stubs out a scaffolded controller and its views. Pass the model name, either CamelCased or under_scored, and a list of views as arguments. The controller name is retrieved as a pluralized version of the model name.
To create a controller within a module, specify the model name as a path like 'parent_module/controller_name'.
This generates a controller class in app/controllers and invokes helper, template engine and test framework generators.

No comments:

Post a Comment