Permalink
Browse files

Fix warning spew

  • Loading branch information...
1 parent 6361d42 commit e57197a9679d5d7a682fc73f12c9f04e067e85cc @wycats wycats committed Oct 7, 2009
Showing with 3 additions and 1 deletion.
  1. +3 −1 actionpack/lib/action_view/base.rb
@@ -236,7 +236,9 @@ def self.for_controller(controller)
# 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

1 comment on commit e57197a

Contributor

masterkain commented on e57197a Oct 7, 2009

I get NoMethodError (private method `remove_const' called for ActionView::Base::Subclasses:Module) on action refresh.

Please sign in to comment.