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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
> 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. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
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)? > > RegardsTry 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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Don Stocks 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'' > > - DonThanks! Just found that out while browsing the app tree. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---