Sha256: 61e5cc860bc475e142c93600ef4d677022ef1b695c9c3880ac1976d1d0fbde6a

Contents?: true

Size: 692 Bytes

Versions: 21

Compression:

Stored size: 692 Bytes

Contents

# This is a stub used to help Spork delay the loading of the real ApplicationController
class ::ApplicationController < ActionController::Base
  @@preloading = true
  class << self
    def inherited(klass)
      (@_descendants ||= []) << klass if @@preloading
      super
    end

    def reapply_inheritance!
      @@preloading = false
      Array(@_descendants).each do |descendant|
        descendant.master_helper_module.send(:include, master_helper_module)
        descendant.send(:default_helper_module!)

        descendant.respond_to?(:reapply_inheritance!) && descendant.reapply_inheritance!
      end
    end
  end
end

Spork.each_run { ApplicationController.reapply_inheritance! }

Version data entries

21 entries across 21 versions & 6 rubygems

Version Path
panjiva-spork-0.8.6 lib/spork/app_framework/rails_stub_files/application_controller.rb
panjiva-spork-0.8.5.1 lib/spork/app_framework/rails_stub_files/application_controller.rb
panjiva-spork-0.8.5 lib/spork/app_framework/rails_stub_files/application_controller.rb
spork-0.8.5 lib/spork/app_framework/rails_stub_files/application_controller.rb
invo-sporknife-0.1.0.3 lib/spork/app_framework/rails_stub_files/application_controller.rb
invo-sporknife-0.1.0.2 lib/spork/app_framework/rails_stub_files/application_controller.rb
spork-0.9.0.rc2 lib/spork/app_framework/rails_stub_files/application_controller.rb
spork-0.9.0.rc lib/spork/app_framework/rails_stub_files/application_controller.rb
wakiki-spork-0.8.5 lib/spork/app_framework/rails_stub_files/application_controller.rb
spork-0.8.4 lib/spork/app_framework/rails_stub_files/application_controller.rb
spork-0.8.3 lib/spork/app_framework/rails_stub_files/application_controller.rb
spork-0.8.2 lib/spork/app_framework/rails_stub_files/application_controller.rb
spork-0.8.1 lib/spork/app_framework/rails_stub_files/application_controller.rb
spork-0.8.0 lib/spork/app_framework/rails_stub_files/application_controller.rb
spork-0.7.8 lib/spork/app_framework/rails_stub_files/application_controller.rb
spork-0.7.6 lib/spork/app_framework/rails_stub_files/application_controller.rb
milhouse-spork-0.7.5.2 lib/spork/app_framework/rails_stub_files/application_controller.rb
pietervisser-spork-0.7.5.1 lib/spork/app_framework/rails_stub_files/application_controller.rb
milhouse-spork-0.7.5 lib/spork/app_framework/rails_stub_files/application_controller.rb
pietervisser-spork-0.7.5 lib/spork/app_framework/rails_stub_files/application_controller.rb