Forum: Ruby on Rails Help with "A copy of ApplicationController has been removed

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
91d00b2e1d76029cb9175053a846051b?d=identicon&s=25 Michael Johnston (Guest)
on 2007-04-30 11:16
(Received via mailing list)
Hi,

I am on Edge Rails, hence with the new dependencies mechanism.

I am trying to get the plugin "acts_as_wizard"  (to work.

I have refactored it to use the new plugin loading system, as best I
know how:

Key part:

module ActsAsWizard
  module ActionControllerExtensions

    def self.append_features(base)
      super
      base.class_eval do
        cattr_accessor :wizards # Hash, contains all the wizards this
controller participates in
          alias_method :original_url_for, :url_for
          alias_method :original_render, :render
          prepend_before_filter WizardSetupFilter
      end
    end

....etc.....

Note I changed the filter to prepend.

THis may be related to the problem I have, which is that when I am in
a wizard, in one of my before_filters defined in my
ApplicationController, I get a "A copy of ApplicationController has
been removed from the module tree but is still active!" error halfway
through the filter.

Does anyone have any idea what sort of thing causes such an error? or
just any tips for debugging problems with the edge rails dependencies
mechanism. It's really opaque to me at this point.

Michael Johnston
91d00b2e1d76029cb9175053a846051b?d=identicon&s=25 Michael Johnston (Guest)
on 2007-04-30 11:30
(Received via mailing list)
If I do this:   config.load_once_paths += %W{ #{RAILS_ROOT}/app/
controllers }

things work. But I really hope there is another solution and I am not
doomed to have to restart the development server for every controller
change for the rest of the life of the project.

Michael
This topic is locked and can not be replied to.