Class: ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
lib/spork/app_framework/rails_stub_files/application_controller.rb

Overview

This is a stub used to help Spork delay the loading of the real ApplicationController

Constant Summary collapse

@@preloading =
true

Class Method Summary collapse

Class Method Details

.inherited(klass) ⇒ Object



5
6
7
8
# File 'lib/spork/app_framework/rails_stub_files/application_controller.rb', line 5

def inherited(klass)
  (@_descendants ||= []) << klass if @@preloading
  super
end

.reapply_inheritance!Object



10
11
12
13
14
15
16
17
18
# File 'lib/spork/app_framework/rails_stub_files/application_controller.rb', line 10

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