Skip to content

Commit

Permalink
Merge pull request sinatra#208 from jkowens/fix_namespacing
Browse files Browse the repository at this point in the history
Fix issue prefixing routes with conditions
  • Loading branch information
Zachary Scott committed Jul 20, 2016
2 parents 72291c6 + 86211ec commit b537546
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sinatra-contrib/lib/sinatra/namespace.rb
Expand Up @@ -268,6 +268,12 @@ def compile(pattern, conditions, default_pattern = nil)
def prefixed_path(a, b)
return a || b || /.*/ unless a and b

concat_patterns(a, b)
end

def concat_patterns(a, b)
return Mustermann.new(b) if a == /.*/

Mustermann.new(a) + Mustermann.new(b)
end

Expand Down

0 comments on commit b537546

Please sign in to comment.