HI, map.connect ''/ads/'', :controller=>''ads'', :action=>''index'' map.connect ''/ads/:id'', :controller=>''ads'', :action=>''show'' The above two lines i am using for routing in my application to show a list of ads when i visit at http:\\localhost:3000\add and an add with the id when i visit at http://localhost:3000\ads\1 now my question is how to set a root so that when i visit http://localhost:3000 the list of adds shoulb be displayed.. i already tried map.connect ''/'', :controller=>''ads'', :action=>''index'' but it did not worked.. please give any suggestion... -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
kiran wrote in post #965887:> HI, > now my question is how to set a root so that when i visit > http://localhost:3000 > the list of adds shoulb be displayed.. > i already tried map.connect > ''/'', :controller=>''ads'', :action=>''index'' but it did not worked.. > please give any suggestion...delete "public/index.html" from project_path -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
map.connect ''/'', :controller=>''ads'', :action=>''index this is working fine now thanx On Dec 3, 12:23 pm, Sniper Abandon <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> kiran wrote in post #965887: > > > HI, > > now my question is how to set a root so that when i visit > >http://localhost:3000 > > the list of adds shoulb be displayed.. > > i already tried map.connect > > ''/'', :controller=>''ads'', :action=>''index'' but it did not worked.. > > please give any suggestion... > > delete "public/index.html" from project_path > > -- > Posted viahttp://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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.