Class: ComfortableMexicanSofa::Configuration
- Inherits:
-
Object
- Object
- ComfortableMexicanSofa::Configuration
- Defined in:
- lib/comfortable_mexican_sofa/configuration.rb
Instance Attribute Summary collapse
-
#admin_route_prefix ⇒ Object
Default url to access admin area is yourhost/cms-admin/ You can change ‘cms-admin’ to ‘admin’, for example.
-
#admin_route_redirect ⇒ Object
/cms-admin redirects to /cms-admin/pages but you can change it to something else.
-
#allow_irb ⇒ Object
Not allowing irb code to be run inside page content.
-
#authentication ⇒ Object
Module that will handle authentication to access cms-admin area.
-
#cms_title ⇒ Object
Don’t like Comfortable Mexican Sofa? Set it to whatever you like.
-
#content_route_prefix ⇒ Object
Default url to content directly is yourhost/ You can change ” to ‘preview’, for example.
-
#enable_caching ⇒ Object
Caching for css/js.
-
#enable_fixtures ⇒ Object
With each page load, files will be synched with the database.
-
#enable_mirror_sites ⇒ Object
All resources across sites are kept in sync.
-
#enable_multiple_sites ⇒ Object
Are you running multiple sites from single install? Default assumption is ‘No’.
-
#fixtures_path ⇒ Object
Path where fixtures can be located.
-
#revisions_limit ⇒ Object
Number of revisions kept.
-
#upload_file_options ⇒ Object
Upload settings.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
Configuration defaults.
Constructor Details
#initialize ⇒ Configuration
Configuration defaults
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/comfortable_mexican_sofa/configuration.rb', line 47 def initialize @cms_title = 'ComfortableMexicanSofa MicroCMS' @authentication = 'ComfortableMexicanSofa::HttpAuth' @seed_data_path = nil @admin_route_prefix = 'cms-admin' @admin_route_redirect = 'pages' @content_route_prefix = '' @enable_multiple_sites = false @enable_mirror_sites = false @allow_irb = false @enable_caching = true @upload_file_options = {} @enable_fixtures = false @fixtures_path = File.('db/cms_fixtures', Rails.root) @revisions_limit = 25 end |
Instance Attribute Details
#admin_route_prefix ⇒ Object
Default url to access admin area is yourhost/cms-admin/ You can change ‘cms-admin’ to ‘admin’, for example.
11 12 13 |
# File 'lib/comfortable_mexican_sofa/configuration.rb', line 11 def admin_route_prefix @admin_route_prefix end |
#admin_route_redirect ⇒ Object
/cms-admin redirects to /cms-admin/pages but you can change it to something else
19 20 21 |
# File 'lib/comfortable_mexican_sofa/configuration.rb', line 19 def admin_route_redirect @admin_route_redirect end |
#allow_irb ⇒ Object
Not allowing irb code to be run inside page content. False by default.
28 29 30 |
# File 'lib/comfortable_mexican_sofa/configuration.rb', line 28 def allow_irb @allow_irb end |
#authentication ⇒ Object
Module that will handle authentication to access cms-admin area
7 8 9 |
# File 'lib/comfortable_mexican_sofa/configuration.rb', line 7 def authentication @authentication end |
#cms_title ⇒ Object
Don’t like Comfortable Mexican Sofa? Set it to whatever you like. :(
4 5 6 |
# File 'lib/comfortable_mexican_sofa/configuration.rb', line 4 def cms_title @cms_title end |
#content_route_prefix ⇒ Object
Default url to content directly is yourhost/ You can change ” to ‘preview’, for example.
15 16 17 |
# File 'lib/comfortable_mexican_sofa/configuration.rb', line 15 def content_route_prefix @content_route_prefix end |
#enable_caching ⇒ Object
Caching for css/js. For admin layout and ones for cms content. Enabled by default.
31 32 33 |
# File 'lib/comfortable_mexican_sofa/configuration.rb', line 31 def enable_caching @enable_caching end |
#enable_fixtures ⇒ Object
With each page load, files will be synched with the database. Database entries are destroyed if there’s no corresponding file. Fixtures are disabled by default.
38 39 40 |
# File 'lib/comfortable_mexican_sofa/configuration.rb', line 38 def enable_fixtures @enable_fixtures end |
#enable_mirror_sites ⇒ Object
All resources across sites are kept in sync
25 26 27 |
# File 'lib/comfortable_mexican_sofa/configuration.rb', line 25 def enable_mirror_sites @enable_mirror_sites end |
#enable_multiple_sites ⇒ Object
Are you running multiple sites from single install? Default assumption is ‘No’
22 23 24 |
# File 'lib/comfortable_mexican_sofa/configuration.rb', line 22 def enable_multiple_sites @enable_multiple_sites end |
#fixtures_path ⇒ Object
Path where fixtures can be located.
41 42 43 |
# File 'lib/comfortable_mexican_sofa/configuration.rb', line 41 def fixtures_path @fixtures_path end |
#revisions_limit ⇒ Object
Number of revisions kept. Default is 25. If you wish to disable: set this to 0.
44 45 46 |
# File 'lib/comfortable_mexican_sofa/configuration.rb', line 44 def revisions_limit @revisions_limit end |
#upload_file_options ⇒ Object
Upload settings
34 35 36 |
# File 'lib/comfortable_mexican_sofa/configuration.rb', line 34 def @upload_file_options end |