rob
August 12th, 2005, 04:51 PM
To set the default index page of your app, you'll need to first delete the index.html file that comes with Rails.
Once you've done this, edit the file config/routes.rb in a text editor and find this:
# map.connect '', :controller => "welcome"
Remove the comment (the "#" sign) and change the controller (specified here by welcome) to the controller you want to set as the default. Also, you can add :action => 'youraction' (replace youraction with the default action of that controller) to specify an action to do in that controller.
That's all there is to it!
Once you've done this, edit the file config/routes.rb in a text editor and find this:
# map.connect '', :controller => "welcome"
Remove the comment (the "#" sign) and change the controller (specified here by welcome) to the controller you want to set as the default. Also, you can add :action => 'youraction' (replace youraction with the default action of that controller) to specify an action to do in that controller.
That's all there is to it!