Skip to content

Commit

Permalink
Fix warning spew
Browse files Browse the repository at this point in the history
  • Loading branch information
wycats committed Oct 7, 2009
1 parent 6361d42 commit e57197a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion actionpack/lib/action_view/base.rb
Expand Up @@ -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
Expand Down

1 comment on commit e57197a

@masterkain
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Please sign in to comment.