I am looking for an easy way to do redirects in my application.
SITUATION:
I have such routes:
http://myapp.com/authors/5-hemingway/books/1-moby-dick
Routes are translated this way (using gem 'i18n_routing'):
http://myapp.com/acutores/5-hemingway/libros/1-moby-dick
Now I have changed the translation of acutores to scriptwriters. A simple step, but I would like to redirect all routes containing the old resource name acutores, instead of routes using "scriptores".
My guess is I should play routes.rb with:
match "/acutores" => redirect("/scriptores")
But how to do it effectively for all cases when "acutores" appear? (especially with nested routes)
redirect ruby-on-rails ruby-on-rails-3 routing
Przemek Maczewski
source share