Module: Cms::Module
- Included in:
- Engine
- Defined in:
- lib/cms/module.rb
Overview
All BrowserCMS modules will:
-
Add app/portlets to the loadpath
-
Serve static assets from their public directory.
Class Method Summary collapse
Instance Method Summary collapse
-
#routes ⇒ Object
This is a bit of a hack, but we need to store the current namespaces so that module developers can just write:.
Class Method Details
.current_namespace ⇒ Object
14 15 16 |
# File 'lib/cms/module.rb', line 14 def self.current_namespace @ns end |
.current_namespace=(ns) ⇒ Object
10 11 12 |
# File 'lib/cms/module.rb', line 10 def self.current_namespace=(ns) @ns = ns end |
Instance Method Details
#routes ⇒ Object
This is a bit of a hack, but we need to store the current namespaces so that module developers can just write:
BcmsZoo::Engine.routes.draw do
<tt>content_blocks :bear</tt>
end
And have it correctly find the right namespaced class model (i.e. BcmsZoo::Bear)
37 38 39 40 |
# File 'lib/cms/module.rb', line 37 def routes Module.current_namespace = ::Cms::EngineHelper.module_name(self.class) super end |