Permalink
Browse files

don't access named routes internals

just ask whether or not the route is defined
  • Loading branch information...
tenderlove committed Jul 30, 2014
1 parent 68aea29 commit 20a277c9a2a2f1bb0ff2a77d52f7e9590dbae8ac
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionview/lib/action_view/test_case.rb
@@ -259,7 +259,7 @@ def _routes
def method_missing(selector, *args)
if @controller.respond_to?(:_routes) &&
- ( @controller._routes.named_routes.helpers.include?(selector) ||
+ ( @controller._routes.named_routes.route_defined?(selector) ||
@controller._routes.mounted_helpers.method_defined?(selector) )
@controller.__send__(selector, *args)
else

0 comments on commit 20a277c

Please sign in to comment.