I'm stuck on a Rails 2.3 app trying to redirect some old URLs. I'm new to RoR and know 3+ way better, so I'm having trouble getting this done.
So: http://siteurl.com/foo/:foo_id goes to http://siteurl.com/foo/:foo_id/foo_items
I think I'm close because the end product goes to: http://siteurl.com/foo/foo_id/foo_items but doesn't pass the :foo_id
params it actually writes it out!
Any help, or pointers are much appreciated.
In my routes.rb
map.connect '/foo/:foo_id',
:controller => 'redirect',
:action => :redirectoldfoo,
:monkey_tag => ':foo_id'
In my redirect controller:
def redirectoldfoo
redirect_to "/auctions/#{params[:monkey_tag]}/catalog_items"
end