Class: Refinery::Core::Engine
- Inherits:
-
Rails::Engine
- Object
- Rails::Engine
- Refinery::Core::Engine
- Extended by:
- Engine
- Defined in:
- lib/refinery/core/engine.rb
Class Method Summary collapse
-
.refinery_inclusion! ⇒ Object
Performs the Refinery inclusion process which extends the currently loaded Rails applications with Refinery’s controllers and helpers.
-
.register_decorators! ⇒ Object
Register all decorators from app/decorators/ and registered plugins’ paths.
Methods included from Engine
after_inclusion, before_inclusion
Class Method Details
.refinery_inclusion! ⇒ Object
Performs the Refinery inclusion process which extends the currently loaded Rails applications with Refinery’s controllers and helpers. The process is wrapped by a before_inclusion and after_inclusion step that calls procs registered by the Refinery::Engine#before_inclusion and Refinery::Engine#after_inclusion class methods
19 20 21 22 23 24 25 26 |
# File 'lib/refinery/core/engine.rb', line 19 def refinery_inclusion! before_inclusion_procs.each(&:call) Refinery.include_once(::ApplicationController, Refinery::ApplicationController) ::ApplicationController.send :helper, Refinery::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/refinery/core/engine.rb', line 11 def register_decorators! Decorators.register! Rails.root, Refinery::Plugins.registered.pathnames end |