Is it possible to send multiple paths to the same resource in Rails?
Example: route both '/foo-bars' and '/foo_bars' to resource :foo_bars
Maybe you'd prefer a permanent redirect instead? Browsers will cache it and possibly less maintenance problems you'll have later on (1 path = 1 resource is something rails programmers typically take for granted)
http://guides.rubyonrails.org/routing.html#redirection
get '/stories/:name', to: redirect('/articles/%{name}')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With