I've set up routes.rb so that the URL http://mysite.com/username
routes the user to :controller => 'foo', :action => 'bar'
However, I am rev-ing my app and based on a flag in the Users table, I
want some users to go to :controller => 'foo2', :action => 'bar2'
while others should continue to get routed via :controller =>
'foo', :action => 'bar'
Is there any way at all to do this via routes.rb? Or some other hack?
I still want the URL to be http://mysite.com/username
Sounds like you want to look into using a before_filter. The job of
the filter would be to redirect the action2 users to action2 and allow
the rest to default to action1.
AndyV - I could, but then some users would be redirected and see a different URL. I’d like everyone to see the same uniform URL : http://mysite.com/myusername