How to define the routing to redirect to URI in config/routes.rb
# config/routes.rb
FooApp::Application.routes.draw do
match '/hoge', to: redirect('/bar')
end
Redirect to /bar from /hoge.
Written by Katsuya Hidaka
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Related Tags
#rails
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#