What are the steps involved in writing and setting up an application in Ruby on Rails?

What are the steps involved in writing and setting up an application in Ruby on Rails?



-Creation of a page takes place for that the application requires a controller and a view. The command that is used to create is:

-Ruby script/generate controller home index.

-This command automatically creates the files and put that in app\view\home folder. Here a template resides that display the output of the action that is being written in the home controller.

-There is a change in routes.rb configuration file that needs to be done to change the routes. The configuration done will be as follows:

-Find the given line in the file:

map.connect ':controller/:action/:id'
map.connect ':controller/:action/:id.:format'
end
Put this line in between as shown below " map.root :controller => 'home' ".
map.connect ':controller/:action/:id'
map.connect ':controller/:action/:id.:format'
map.root :controller => 'home'
end
Post your comment