Key partial name cache on controller and object class *names* to avoid memory leaks in dev mode

This commit is contained in:
Jeremy Kemper 2010-04-02 15:54:38 -07:00
parent a1a3520198
commit ee7605ecf0
1 changed files with 2 additions and 2 deletions

View File

@ -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|