aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2012-01-03 20:26:45 +0100
committerJosé Valim <jose.valim@gmail.com>2012-01-03 20:26:45 +0100
commit180edc84f1bf848dcd25d194d24c3f8c28889603 (patch)
tree209accfd80137fca7ad6eddcf3815478898a0db8 /actionpack/lib/action_dispatch/routing
parent49b6b4994eb68a5d9c02478c7ee988101cfb198c (diff)
downloadrails-180edc84f1bf848dcd25d194d24c3f8c28889603.tar.gz
rails-180edc84f1bf848dcd25d194d24c3f8c28889603.tar.bz2
rails-180edc84f1bf848dcd25d194d24c3f8c28889603.zip
Override respond_to? since we are also overriding method_missing.
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-rw-r--r--actionpack/lib/action_dispatch/routing/routes_proxy.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/routing/routes_proxy.rb b/actionpack/lib/action_dispatch/routing/routes_proxy.rb
index f7d5f6397d..73af5920ed 100644
--- a/actionpack/lib/action_dispatch/routing/routes_proxy.rb
+++ b/actionpack/lib/action_dispatch/routing/routes_proxy.rb
@@ -16,6 +16,10 @@ module ActionDispatch
end
end
+ def respond_to?(method, include_private = false)
+ super || routes.url_helpers.respond_to?(method)
+ end
+
def method_missing(method, *args)
if routes.url_helpers.respond_to?(method)
self.class.class_eval <<-RUBY, __FILE__, __LINE__ + 1