Skip to content

Commit

Permalink
Check routing matches for emptiness more precisely since Merb::Router…
Browse files Browse the repository at this point in the history
….match definitely allows [nil, non-empty-hash] result
  • Loading branch information
yrashk committed May 27, 2008
1 parent b5b270f commit 9da459f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/merb-core/test/helpers/request_helper.rb
Expand Up @@ -300,7 +300,7 @@ def dispatch_request(request, controller_klass, action, &blk)
# Hash:: The parameters built based on the matching route. # Hash:: The parameters built based on the matching route.
def check_request_for_route(request) def check_request_for_route(request)
match = ::Merb::Router.match(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" raise ::Merb::ControllerExceptions::BadRequest, "No routes match the request"
else else
match[1] match[1]
Expand Down

3 comments on commit 9da459f

@yrashk
Copy link
Owner Author

@yrashk yrashk commented on 9da459f May 27, 2008

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@michaelklishin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yrashk hacks on merb ;)

@yrashk
Copy link
Owner Author

@yrashk yrashk commented on 9da459f May 27, 2008

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so what?

Please sign in to comment.