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
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’
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:
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.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs