hi, i''m setting up some routes, but i''ve a little problem. i''ve written map.connect '''', :controller => ''/categories'', :action => :index and tryed to show localhost:3000...ok, it works...partially, it changes the url to localhost:3000/categories how can i change it and set it to stay just with localhost:3000 ? i need this because of analytics, it doesn''t work if the url changes :( thanks -- 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?hl=en -~----------~----~----~----~------~----~------~--~---
Mix Mix wrote:> hi, i''m setting up some routes, but i''ve a little problem. > i''ve written map.connect '''', :controller => ''/categories'', :action => > :index > and tryed to show localhost:3000...ok, it works...partially, it changes > the url to localhost:3000/categories > how can i change it and set it to stay just with localhost:3000 ? i need > this because of analytics, it doesn''t work if the url changes :( > thanksWell it shouldnt redirect to /categories if thats what you mean, it should stay as it is, maybe because you add / in the front. map.connect '''', :controller => :categories, :action => :index -- 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?hl=en -~----------~----~----~----~------~----~------~--~---
Jamal Soueidan wrote:> Mix Mix wrote: >> hi, i''m setting up some routes, but i''ve a little problem. >> i''ve written map.connect '''', :controller => ''/categories'', :action => >> :index >> and tryed to show localhost:3000...ok, it works...partially, it changes >> the url to localhost:3000/categories >> how can i change it and set it to stay just with localhost:3000 ? i need >> this because of analytics, it doesn''t work if the url changes :( >> thanks > > Well it shouldnt redirect to /categories if thats what you mean, it > should stay as it is, maybe because you add / in the front. > > map.connect '''', :controller => :categories, :action => :indexopss, found the error, was another method that was called and which did a redirect...btw, now works... but is it normal that it doesn''t use the controller? i''ve set a variable @xxx = ''test'' and when in the view i print @xxx.nil? the result it''s true O_o -- 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?hl=en -~----------~----~----~----~------~----~------~--~---
found the problem (bug?) map.connect '''', :controller => :categories, :action => :index doesn''t use the controller, but just the view (also if i don''t understand why layout nil works..) map.connect '''', :controller => :categories, :action => ''index'' works without problems :) -- 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?hl=en -~----------~----~----~----~------~----~------~--~---