aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-07-30 15:27:20 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2014-07-30 15:27:20 -0700
commit20a277c9a2a2f1bb0ff2a77d52f7e9590dbae8ac (patch)
treeb2ac8ff2a05e38b44bc88ad6419dfcbb60ae5410 /actionview
parent68aea29cf5e5b856fdfa0b3087bf68cbd6310bd6 (diff)
downloadrails-20a277c9a2a2f1bb0ff2a77d52f7e9590dbae8ac.tar.gz
rails-20a277c9a2a2f1bb0ff2a77d52f7e9590dbae8ac.tar.bz2
rails-20a277c9a2a2f1bb0ff2a77d52f7e9590dbae8ac.zip
don't access named routes internals
just ask whether or not the route is defined
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/test_case.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/test_case.rb b/actionview/lib/action_view/test_case.rb
index 9e8e6f43d5..d0da415c5d 100644
--- a/actionview/lib/action_view/test_case.rb
+++ b/actionview/lib/action_view/test_case.rb
@@ -259,7 +259,7 @@ module ActionView
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