From bcbb806fef87b1c33d5507adc5877671a57d1821 Mon Sep 17 00:00:00 2001 From: David Masover Date: Mon, 29 Sep 2008 22:12:50 -0500 Subject: [PATCH] Use controller_path instance method, not the class method. The instance method calls the class method by default. With this change, controllers can override the instance method to set a dynamic controller_path for a given request. --- actionpack/lib/action_controller/base.rb | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 457b9e8..0333e30 100644 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -1248,7 +1248,7 @@ module ActionController #:nodoc: action_name = strip_out_controller(action_name) end end - "#{self.class.controller_path}/#{action_name}" + "#{self.controller_path}/#{action_name}" end def strip_out_controller(path) @@ -1256,7 +1256,7 @@ module ActionController #:nodoc: end def template_path_includes_controller?(path) - self.class.controller_path.split('/')[-1] == path.split('/')[0] + self.controller_path.split('/')[-1] == path.split('/')[0] end def process_cleanup -- 1.5.4.3