Last Updated: February 25, 2016
·
283
· hidakatsuya

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.