Sha256: 6b74191917a6512da91497d0063a5ec7bbf47b5f10943d873152a44330be9c3b

Contents?: true

Size: 1.21 KB

Versions: 8

Compression:

Stored size: 1.21 KB

Contents

GENERATOR
     controller - create controller and view stub files

SYNOPSIS
     generate controller ControllerName action [action ...]

DESCRIPTION
     The controller generator takes the name of the new controller as the
     first argument and a variable number of view names as subsequent arguments.
     The controller name should be supplied without a "Controller" suffix. The
     generator will add that itself.
     
     Controller generates a controller file in app/controllers with a render
     action for each of the view names passed, a test suite in test/functional
     with one passing test case, and HTML stubs for each view in app/views
     under a directory with the same name as the controller.
     
EXAMPLE
     ./script/generate controller Blog list display new edit
     
     This will generate a BlogController class in
     app/controllers/blog_controller.rb, a BlogHelper class in
     app/helpers/blog_helper.rb and a BlogControllerTest in
     test/functional/blog_controller_test.rb, and list.rhtml,
     display.rhtml, new.rhtml, and edit.rhtml in app/views/blog.
     
     The BlogController class will have list, display, new, and edit actions.
     Each action will render the associated view by default.

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
devise_sociable-0.1.0 vendor/bundle/gems/rails-0.9.5/generators/controller/USAGE
rails-0.9.2 generators/controller/USAGE
rails-0.9.1 generators/controller/USAGE
rails-0.9.0 generators/controller/USAGE
rails-0.9.4 generators/controller/USAGE
rails-0.9.3 generators/controller/USAGE
rails-0.9.4.1 generators/controller/USAGE
rails-0.9.5 generators/controller/USAGE