Default application action

Hello all,

I’m kinda new to RoR and I wondered how do I define which controller and
action is run by default when you point the browser to the application
address (ie not specifying a controller name)?

Regards

gamehack wrote:

Hello all,

I’m kinda new to RoR and I wondered how do I define which controller and
action is run by default when you point the browser to the application
address (ie not specifying a controller name)?

Regards

Try adding / changing the default route in config/routes.rb. Look for
the line that starts with : map.connect ‘’ and change it to :

map.connect ‘’, :controller => ‘your_controller’, :action =>
‘your_action’

  • Don

I’m kinda new to RoR and I wondered how do I define which controller and
action is run by default when you point the browser to the application
address (ie not specifying a controller name)?

Look at config/routes.rb

Near the top you’ll see something like this:

You can have the root of your site routed by hooking up ‘’

– just remember to delete public/index.html.

map.connect ‘’, :controller => “home”

I think the default controller is named ‘welcome’ and it’s all commented
out, but there you go.

Don S. wrote:

Try adding / changing the default route in config/routes.rb. Look for
the line that starts with : map.connect ‘’ and change it to :

map.connect ‘’, :controller => ‘your_controller’, :action =>
‘your_action’

  • Don

Thanks! Just found that out while browsing the app tree.