Skip to content
This repository has been archived by the owner on May 16, 2021. It is now read-only.

Commit

Permalink
There is still a problem with prefixing methods with conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachary Scott committed Jul 19, 2016
1 parent 9500d76 commit 2d2a445
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sinatra/namespace.rb
Expand Up @@ -272,7 +272,7 @@ def prefixed_path(a, b)
end

def prefixed(method, pattern = nil, conditions = {}, &block)
default = '*' if method == :before or method == :after
default = /.*/ if method == :before or method == :after
pattern, conditions = compile pattern, conditions, default
result = base.send(method, pattern, conditions, &block)
invoke_hook :route_added, method.to_s.upcase, pattern, block
Expand Down

0 comments on commit 2d2a445

Please sign in to comment.