diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2005-07-05 01:31:03 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2005-07-05 01:31:03 +0000 |
commit | fa158ff07a807e56886e0b5bb91bee9a13e25ea0 (patch) | |
tree | 2681db09d7b2a2afed09cef507a38d4ca070f2d1 /actionpack | |
parent | d2b9e39c8562dba58d0d76646866a1949eb3f9a6 (diff) | |
download | rails-fa158ff07a807e56886e0b5bb91bee9a13e25ea0.tar.gz rails-fa158ff07a807e56886e0b5bb91bee9a13e25ea0.tar.bz2 rails-fa158ff07a807e56886e0b5bb91bee9a13e25ea0.zip |
r2829@asus: jeremy | 2005-07-04 23:31:55 -0700
cache protected_instance_variables
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1690 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index a8c2f206b9..381effeab3 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -329,7 +329,7 @@ module ActionController #:nodoc: # 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+:/).first) - path_of_controller_root = path_of_calling_controller.sub(/#{controller_path.split("/")[0..-2]}$/, "") + path_of_controller_root = path_of_calling_controller.sub(/#{controller_path.split("/")[0..-2]}$/, "") # " (for ruby-mode) self.template_root = path_of_controller_root end @@ -663,9 +663,9 @@ module ActionController #:nodoc: end def add_instance_variables_to_assigns - protected_variables_cache = protected_instance_variables + @@protected_variables_cache = protected_instance_variables.inject({}) { |h, k| h[k] = true; h } instance_variables.each do |var| - next if protected_variables_cache.include?(var) + next if @@protected_variables_cache.include?(var) @assigns[var[1..-1]] = instance_variable_get(var) end end |