Module: MerbScrewUnit
- Defined in:
- lib/merb_screw_unit.rb
Overview
All Slice code is expected to be namespaced inside a module
Defined Under Namespace
Classes: Application, Main
Class Method Summary collapse
-
.activate ⇒ Object
Activation hook - runs after AfterAppLoads BootLoader.
-
.deactivate ⇒ Object
Deactivation hook - triggered by Merb::Slices.deactivate(MerbScrewUnit).
-
.init ⇒ Object
Initialization hook - runs before AfterAppLoads BootLoader.
-
.loaded ⇒ Object
Stub classes loaded hook - runs before LoadClasses BootLoader right after a slice’s classes have been loaded internally.
-
.setup_router(scope) ⇒ Object
Setup routes inside the host application.
Class Method Details
.activate ⇒ Object
Activation hook - runs after AfterAppLoads BootLoader
43 44 |
# File 'lib/merb_screw_unit.rb', line 43 def self.activate end |
.deactivate ⇒ Object
Deactivation hook - triggered by Merb::Slices.deactivate(MerbScrewUnit)
47 48 |
# File 'lib/merb_screw_unit.rb', line 47 def self.deactivate end |
.init ⇒ Object
Initialization hook - runs before AfterAppLoads BootLoader
39 40 |
# File 'lib/merb_screw_unit.rb', line 39 def self.init end |
.loaded ⇒ Object
Stub classes loaded hook - runs before LoadClasses BootLoader right after a slice’s classes have been loaded internally.
35 36 |
# File 'lib/merb_screw_unit.rb', line 35 def self.loaded end |
.setup_router(scope) ⇒ Object
prefix your named routes with :merb_screw_unit_ to avoid potential conflicts with global named routes.
Setup routes inside the host application
59 60 61 62 63 |
# File 'lib/merb_screw_unit.rb', line 59 def self.setup_router(scope) # example of a named route scope.match('/index.:format').to(:controller => 'main', :action => 'index').name(:merb_screw_unit_index) scope.match('/:controller/:action') end |