Class: Answers::Core::Engine

Inherits:
Rails::Engine
  • Object
show all
Extended by:
Engine
Defined in:
lib/answers/core/engine.rb

Class Method Summary collapse

Methods included from Engine

after_inclusion, before_inclusion

Class Method Details

.answers_inclusion!Object

Performs the Answers inclusion process which extends the currently loaded Rails applications with Answers’s controllers and helpers. The process is wrapped by a before_inclusion and after_inclusion step that calls procs registered by the Answers::Engine#before_inclusion and Answers::Engine#after_inclusion class methods



19
20
21
22
23
24
25
26
# File 'lib/answers/core/engine.rb', line 19

def answers_inclusion!
  before_inclusion_procs.each(&:call)

  #Answers.include_once(::ApplicationController, Answers::ApplicationController)
  #::ApplicationController.send :helper, Answers::Core::Engine.helpers

  after_inclusion_procs.each(&:call)
end

.register_decorators!Object

Register all decorators from app/decorators/ and registered plugins’ paths.



11
12
13
# File 'lib/answers/core/engine.rb', line 11

def register_decorators!
  #Decorators.register! Rails.root, Answers::Plugins.registered.pathnames
end