ruby - Did Rails Routing change the way it handles the params[:path]? -


i upgraded site ruby 1.8.7 ruby 1.9.2, , rails 3.0.x 3.2.x. noticed of legacy urls weren't being handled correctly anymore, , wanted diagnose issue.

here's noticed.

http://myapp.com/links/oldlink.html had, in old app, provided params[:path] of /links/oldlink.html, now providing links/oldlink. it's dropping leading forwardslash file extension.

can me figure out what's going on here? of course can manually change legacy strings in database drop forward slashes , file extensions, seems hacky solution, , want make sure understand underlying principles account change in rails routing behavior.

thanks!

you should try in routes.rb

match '/foo', :to => redirect('/foo.html') 

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -