hey there, i am a brand new rails guy. I am using rad rails because i already use eclipse for all things python and php. my question is, when you start a new project, how do you get the index page in the web folder to point to different controllers ? What i mean is, in all the tutorials, you see them point browsers to localhost:3000/say/hello, or localhost:3000/user/login. But if i point an app to localhost:3000/ should i just redirect_to to wherever i want the index page to be? i know this is the most basic of questions. I am still trying to get my head around MVC. I know it will be worth it in the end, but now..... thanks --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
check out config/routes.rb # You can have the root of your site routed by hooking up '''' # -- just remember to delete public/index.html. # map.connect '''', :controller => "welcome" On 11/8/06, nephish <nephish-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > hey there, > i am a brand new rails guy. I am using rad rails because i already use > eclipse for all things python and php. > my question is, when you start a new project, how do you get the index > page in the web folder to point to different controllers ? What i mean > is, in all the tutorials, you see them point browsers to > localhost:3000/say/hello, or localhost:3000/user/login. But if i point > an app to localhost:3000/ should i just redirect_to to wherever i want > the index page to be? > > i know this is the most basic of questions. I am still trying to get my > head around MVC. I know it will be worth it in the end, but now..... > > thanks > > > > >--~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
edit config/routes.rb and add: map.connect '''', :controller => "whatever" before the line map.connect '':controller/:action/:id'' where "whatever" is simply the controller that you wish to handle the request for localhost:3000/ If you want to specify a default method (instead of "index") then just add this to the end of the line: map.connect '''', :controller => "whatever", :action => "however". ~Wayne On Nov 08, 2006, at 22:09 , nephish wrote:> > hey there, > i am a brand new rails guy. I am using rad rails because i already use > eclipse for all things python and php. > my question is, when you start a new project, how do you get the index > page in the web folder to point to different controllers ? What i mean > is, in all the tutorials, you see them point browsers to > localhost:3000/say/hello, or localhost:3000/user/login. But if i > point > an app to localhost:3000/ should i just redirect_to to wherever i > want > the index page to be? > > i know this is the most basic of questions. I am still trying to > get my > head around MVC. I know it will be worth it in the end, but now..... > > thanks > > > >--~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
On Nov 8, 9:17 pm, "Wayne E. Seguin" <wayneeseg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> edit config/routes.rb and add: > > map.connect '''', :controller => "whatever" > > before the line map.connect '':controller/:action/:id'' > > where "whatever" is simply the controller that you wish to handle the > request for localhost:3000/ > > If you want to specify a default method (instead of "index") then > just add this to the end of the line: > map.connect '''', :controller => "whatever", :action => "however". > > ~Wayne > > On Nov 08, 2006, at 22:09 , nephish wrote: > > > > > hey there, > > i am a brand new rails guy. I am using rad rails because i already use > > eclipse for all things python and php. > > my question is, when you start a new project, how do you get the index > > page in the web folder to point to different controllers ? What i mean > > is, in all the tutorials, you see them point browsers to > > localhost:3000/say/hello, or localhost:3000/user/login. But if i > > point > > an app to localhost:3000/ should i just redirect_to to wherever i > > want > > the index page to be? > > > i know this is the most basic of questions. I am still trying to > > get my > > head around MVC. I know it will be worth it in the end, but now..... > > > thankswell ok, thanks guys ! -shawn --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---