Search code examples
ruby-on-railsrubyscaffolding

Create scaffold by skipping the model


I have rails 2.3 and ruby 1.8.7

I want to create only a controller and view files for it. Is there any command in rails2.3 that will help me in doing this. I know this can be done in rails 3, but is there a way to do this in rails 2.3


Solution

  • Just say script/generate controller [controller_name] [action_name_1] [action_name_2] ... in the Rails directory to create a controller with the given actions and corresponding view files.