From e57197a9679d5d7a682fc73f12c9f04e067e85cc Mon Sep 17 00:00:00 2001 From: Yehuda Katz Date: Tue, 6 Oct 2009 22:36:14 -1000 Subject: Fix warning spew --- actionpack/lib/action_view/base.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'actionpack') diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index ec1b07797b..01f33203ed 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.rb @@ -236,7 +236,9 @@ module ActionView #:nodoc: # they are in AC. if controller.class.respond_to?(:_helper_serial) klass = @views[controller.class._helper_serial] ||= Class.new(self) do - Subclasses.const_set(controller.class.name.gsub(/::/, '__'), self) + name = controller.class.name.gsub(/::/, '__') + Subclasses.remove_const(name) if Subclasses.const_defined?(name) + Subclasses.const_set(name, self) if controller.respond_to?(:_helpers) include controller._helpers -- cgit v1.2.3 From 3916f0340e8714d36a64162be793192849a9e51f Mon Sep 17 00:00:00 2001 From: Yehuda Katz Date: Wed, 7 Oct 2009 00:33:13 -1000 Subject: Not calling a private method anymore --- actionpack/lib/action_view/base.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'actionpack') diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index 01f33203ed..664cc3b562 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.rb @@ -237,8 +237,11 @@ module ActionView #:nodoc: if controller.class.respond_to?(:_helper_serial) klass = @views[controller.class._helper_serial] ||= Class.new(self) do name = controller.class.name.gsub(/::/, '__') - Subclasses.remove_const(name) if Subclasses.const_defined?(name) - Subclasses.const_set(name, self) + + Subclasses.class_eval do + remove_const(name) if const_defined?(name) + const_set(name, self) + end if controller.respond_to?(:_helpers) include controller._helpers -- cgit v1.2.3