Skip to content

Commit

Permalink
Merge pull request #269 from exAspArk/route_options
Browse files Browse the repository at this point in the history
Add ability to pass additional options to apipie route
  • Loading branch information
iNecas committed Jul 28, 2014
2 parents beb1dc3 + 0b6c42d commit 9a60aee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/apipie/routing.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module Apipie
module Routing
module MapperExtensions
def apipie
def apipie(options = {})
namespace "apipie", :path => Apipie.configuration.doc_base_url do
get 'apipie_checksum', :to => "apipies#apipie_checksum", :format => "json"
constraints(:version => /[^\/]+/, :resource => /[^\/]+/, :method => /[^\/]+/) do
get("(:version)/(:resource)/(:method)" => "apipies#index", :as => :apipie)
get(options.reverse_merge("(:version)/(:resource)/(:method)" => "apipies#index", :as => :apipie))
end
end
end
Expand Down

0 comments on commit 9a60aee

Please sign in to comment.