Class: RailsConnector::Configuration
- Inherits:
-
Object
- Object
- RailsConnector::Configuration
- Defined in:
- lib/rails_connector/configuration.rb
Constant Summary collapse
- DEFAULT_MODE =
:live
Class Attribute Summary collapse
-
.blob_cache_dir ⇒ Object
define a non-default blob cache dir.
-
.mode ⇒ Object
there are three available modes for the rails connector:
live
(show released contents only),preview
(show edited contents)editor
(show edited contents and editor interface (e.g. edit markers)) Default mode islive
. -
.search_options ⇒ Object
default options for SearchRequest.
Class Method Summary collapse
-
.choose_homepage(&block) ⇒ Object
Configure a callback to be invoked when the rails connector delivers the homepage.
-
.instance_name=(name) ⇒ Object
Configures your CMS instance name.
Class Attribute Details
.blob_cache_dir ⇒ Object
define a non-default blob cache dir. fiona connector only. has no effect when used with the cloud connector.
35 36 37 |
# File 'lib/rails_connector/configuration.rb', line 35 def blob_cache_dir @blob_cache_dir end |
.mode ⇒ Object
there are three available modes for the rails connector: live
(show released contents only), preview
(show edited contents) editor
(show edited contents and editor interface (e.g. edit markers)) Default mode is live
.
20 21 22 |
# File 'lib/rails_connector/configuration.rb', line 20 def mode @mode end |
.search_options ⇒ Object
default options for SearchRequest
28 29 30 |
# File 'lib/rails_connector/configuration.rb', line 28 def @search_options || local_config_file["search"].symbolize_keys end |
Class Method Details
.choose_homepage(&block) ⇒ Object
Configure a callback to be invoked when the rails connector delivers the homepage. The given callback will receive the rack env and must return an Obj to be used as the homepage. If no callback is configured, Obj.homepage will be used as the default.
99 100 101 |
# File 'lib/rails_connector/configuration.rb', line 99 def choose_homepage(&block) self.choose_homepage_callback = block end |
.instance_name=(name) ⇒ Object
Configures your CMS instance name.
Example call as to be used in rails_connector.rb
:
RailsConnector::Configuration.instance_name = 'internet'
67 68 69 |
# File 'lib/rails_connector/configuration.rb', line 67 def instance_name=(name) RailsConnector::CmsBaseModel.instance_name = name if RailsConnector.platform_fiona? end |