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
Mix M. 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 => :index
Jamal S. wrote:
Mix M. 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
opss, 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
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