aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/components.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-11-26 01:24:10 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-11-26 01:24:10 +0000
commitba1db2de63b022b53cc2569fc89a6617824b0415 (patch)
tree84db0e5ba2876a0443c011fd8a20e5a551d9bdbb /actionpack/lib/action_controller/components.rb
parent1d564d97c5216210be03862d90fd7ea222afdc52 (diff)
downloadrails-ba1db2de63b022b53cc2569fc89a6617824b0415.tar.gz
rails-ba1db2de63b022b53cc2569fc89a6617824b0415.tar.bz2
rails-ba1db2de63b022b53cc2569fc89a6617824b0415.zip
uses_component_template_root looks at caller[0] which turns up the deprecation method rather than the controller. Use caller[1] instead.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5631 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/components.rb')
-rw-r--r--actionpack/lib/action_controller/components.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/components.rb b/actionpack/lib/action_controller/components.rb
index e6b0194647..5d5a48ebcc 100644
--- a/actionpack/lib/action_controller/components.rb
+++ b/actionpack/lib/action_controller/components.rb
@@ -75,7 +75,7 @@ module ActionController #:nodoc:
# will also use /code/weblog/components as template root
# and find templates in /code/weblog/components/admin/parties/users/
def uses_component_template_root
- path_of_calling_controller = File.dirname(caller[0].split(/:\d+:/, 2).first)
+ path_of_calling_controller = File.dirname(caller[1].split(/:\d+:/, 2).first)
path_of_controller_root = path_of_calling_controller.sub(/#{Regexp.escape(File.dirname(controller_path))}$/, "")
self.template_root = path_of_controller_root