Module: ComfyPress
- Defined in:
- lib/comfypress.rb,
lib/comfypress/error.rb,
lib/comfypress/engine.rb,
lib/comfypress/version.rb
Defined Under Namespace
Modules: ActsAsTree, DummyAuth, Fixtures, HasRevisions, HttpAuth, IsCategorized, IsMirrored, RenderMethods, Routing, Tag, ViewHooks, ViewMethods Classes: Configuration, Engine, Error, FormBuilder, MissingLayout, MissingPage, MissingSite, Sitemap
Constant Summary collapse
- VERSION =
"0.1.4"
Class Method Summary collapse
-
.configuration ⇒ Object
(also: config)
Accessor for ComfyPress::Configuration.
-
.configure {|configuration| ... } ⇒ Object
Modify CMS configuration Example: ComfyPress.configure do |config| config.cms_title = ‘ComfyPress’ end.
-
.establish_connection(klass) ⇒ Object
Establishing database connection if custom one is defined.
- .logger ⇒ Object
- .logger=(new_logger) ⇒ Object
Class Method Details
.configuration ⇒ Object Also known as: config
Accessor for ComfyPress::Configuration
45 46 47 |
# File 'lib/comfypress.rb', line 45 def configuration @configuration ||= Configuration.new end |
.configure {|configuration| ... } ⇒ Object
Modify CMS configuration Example:
ComfyPress.configure do |config|
config.cms_title = 'ComfyPress'
end
40 41 42 |
# File 'lib/comfypress.rb', line 40 def configure yield configuration end |
.establish_connection(klass) ⇒ Object
Establishing database connection if custom one is defined
51 52 53 54 55 |
# File 'lib/comfypress.rb', line 51 def establish_connection(klass) if ComfyPress.config.database_config && !Rails.env.test? klass.establish_connection "#{ComfyPress.config.database_config}_#{Rails.env}" end end |
.logger ⇒ Object
61 62 63 |
# File 'lib/comfypress.rb', line 61 def logger @logger ||= Rails.logger end |
.logger=(new_logger) ⇒ Object
57 58 59 |
# File 'lib/comfypress.rb', line 57 def logger=(new_logger) @logger = new_logger end |