diff options
author | Yehuda Katz <wycats@gmail.com> | 2009-10-06 22:36:14 -1000 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2009-10-06 22:36:14 -1000 |
commit | e57197a9679d5d7a682fc73f12c9f04e067e85cc (patch) | |
tree | e952f34f5f987b1b3a1ddf0779f93c3dd176a200 /actionpack/lib | |
parent | 6361d4234ca7f7c2dcb98e6ed34187d2933b56d7 (diff) | |
download | rails-e57197a9679d5d7a682fc73f12c9f04e067e85cc.tar.gz rails-e57197a9679d5d7a682fc73f12c9f04e067e85cc.tar.bz2 rails-e57197a9679d5d7a682fc73f12c9f04e067e85cc.zip |
Fix warning spew
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/base.rb | 4 |
1 files changed, 3 insertions, 1 deletions
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 |