diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2010-04-02 15:54:38 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-04-02 15:54:38 -0700 |
commit | ee7605ecf0d36d16cddd885bb9df6ebddda8ff39 (patch) | |
tree | 2d6064fd02d4cb8bd3eb42a4846b84dc03ead584 /actionpack | |
parent | a1a352019847653c0001ee6b5efeda010c727f86 (diff) | |
download | rails-ee7605ecf0d36d16cddd885bb9df6ebddda8ff39.tar.gz rails-ee7605ecf0d36d16cddd885bb9df6ebddda8ff39.tar.bz2 rails-ee7605ecf0d36d16cddd885bb9df6ebddda8ff39.zip |
Key partial name cache on controller and object class *names* to avoid memory leaks in dev mode
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_view/render/partials.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/render/partials.rb b/actionpack/lib/action_view/render/partials.rb index f04a89c1ac..4d23d55687 100644 --- a/actionpack/lib/action_view/render/partials.rb +++ b/actionpack/lib/action_view/render/partials.rb @@ -179,7 +179,7 @@ module ActionView def initialize(view_context, options, block) @view = view_context - @partial_names = PARTIAL_NAMES[@view.controller.class] + @partial_names = PARTIAL_NAMES[@view.controller.class.name] setup(options, block) end @@ -300,7 +300,7 @@ module ActionView end def partial_path(object = @object) - @partial_names[object.class] ||= begin + @partial_names[object.class.name] ||= begin object = object.to_model if object.respond_to?(:to_model) object.class.model_name.partial_path.dup.tap do |partial| |