Browse files

Check routing matches for emptiness more precisely since Merb::Router…

….match definitely allows [nil, non-empty-hash] result
  • Loading branch information...
1 parent b5b270f commit 9da459f77d05d262f6fc4b421c151037d3856794 @yrashk committed May 27, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/merb-core/test/helpers/request_helper.rb
@@ -300,7 +300,7 @@ def dispatch_request(request, controller_klass, action, &blk)
# Hash:: The parameters built based on the matching route.
def check_request_for_route(request)
match = ::Merb::Router.match(request)
- if match[0].nil?
+ if match[0].nil? && match[1].empty?
raise ::Merb::ControllerExceptions::BadRequest, "No routes match the request"

3 comments on commit 9da459f

yrashk commented on 9da459f May 27, 2008

wycats: Ezra says we should fix deferred routes so they have an index


yrashk hacks on merb ;)

yrashk commented on 9da459f May 27, 2008

so what?

Please sign in to comment.