Skip to content

Instantly share code, notes, and snippets.

@bjeanes
Created March 15, 2012 14:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjeanes/2044335 to your computer and use it in GitHub Desktop.
Save bjeanes/2044335 to your computer and use it in GitHub Desktop.
scope :module => "Api::V2" do
scope :path => "api/v2" do
resources :users
end
end
scope :module => "Api::V1" do
scope :path => "api/v1" do
resources :users
end
end
scope :path => "api(/:api)" do
match "*path", :to => redirect("/api/v2/%{path}")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment