RUBY: Easy to create first controller in ruby on rails

Create new controller in ruby on rails is the easy thing. Just follow the following process

[root]# script/generate controller <controller-name>

Sample
script/generate controller registration

this will genereate the following folders/files.

      exists  app/controllers/
      exists  app/helpers/
      create  app/views/registration
      exists  test/functional/
      create  app/controllers/registration_controller.rb
      create  test/functional/registration_controller_test.rb
      create  app/helpers/registration_helper.rb

No comments:

Post a Comment