Skip to content

Instantly share code, notes, and snippets.

@mwlang
Created June 20, 2013 17:18
Show Gist options
  • Save mwlang/5824684 to your computer and use it in GitHub Desktop.
Save mwlang/5824684 to your computer and use it in GitHub Desktop.
passing the new path from router during redirect
scope(:controller => 'site/about') do |about|
get 'about/community', :controller => 'site', :action => 'redirect', :path => '/community', as: :site_about_community
get 'about/offices', :controller => 'site', :action => 'redirect', :path => '/offices', as: :site_about_offices
get 'about/office/:id', :controller => 'site', :action => 'redirect', :path => '/offices', as: :site_about_office_detail
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment