Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 305 Bytes

redirect-a-path.md

File metadata and controls

17 lines (11 loc) · 305 Bytes

Redirect a Path

To redirect a path in Rails:

# config/routes.rb

get "/authors" => redirect("/designers")

This lets you take a difficult-to-type path name and expose it to your users as a simpler path name:

# config/routes.rb

get "/login" => redirect("/auth/google_oauth2")