Created
July 22, 2013 12:10
-
-
Save vdmgolub/6053379 to your computer and use it in GitHub Desktop.
API versioning with constraints
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :api do | |
constrants ApiVersion.new(1) do | |
scope :module => :v1 do | |
resource :app do | |
resources :indices | |
end | |
end | |
end | |
constraints ApiVersion.new(2) do | |
scope :module => :v2 | |
resource :app do | |
resources :indices | |
end | |
end | |
end | |
match "/*path", to: "errors#unsupported_version", via: :all | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment