class ComfortableMexicanSofa::Configuration

Attributes

admin_auth[RW]

Module that will handle authentication to access cms-admin area

admin_authorization[RW]

Module that will handle authorization against admin cms resources

admin_base_controller[RW]

Controller that is inherited from CmsAdmin::BaseController 'ApplicationController' is the default

admin_cache_sweeper[RW]

A class that is included as a sweeper to admin base controller if it's set

admin_locale[RW]

Admin interface will respect the locale of the site being managed. However you can force it to English by setting this to `:en`

admin_route_redirect[RW]

When arriving at /cms-admin you may chose to redirect to arbirtary path, for example '/cms-admin/users'

allow_erb[RW]

Not allowing erb code to be run inside page content. False by default. @return [Boolean]

allowed_helpers[RW]

Whitelist of all helper methods that can be used via {{cms:helper}} tag. By default all helpers are allowed except `eval`, `send`, `call` and few others. Empty array will prevent rendering of all helpers.

allowed_partials[RW]

Whitelist of partials paths that can be used via {{cms:partial}} tag. All partials are accessible by default. Empty array will prevent rendering of all partials.

allowed_templates[RW]

Whitelist of template paths that can be used via {{cms:template}} tag. All templates are accessible by default. Empty array will prevent rendering of all templates.

cms_title[RW]

Don't like ComfortableMexicanSofa? Set it to whatever you like. :(

enable_seeds[RW]

With each page load, files will be synched with the database. Database entries are destroyed if there's no corresponding file. Seeds are disabled by default.

hostname_aliases[RW]

Site aliases, if you want to have aliases for your site. Good for harmonizing production env with dev/testing envs. e.g. config.site_aliases = {'host.com' => 'host.inv', 'host_a.com' => ['host.lvh.me', 'host.dev']} Default is nil (not used)

locales[RW]

Locale definitions. If you want to define your own locale merge {:locale => 'Locale Title'} with this.

page_to_json_options[RW]

Customize returned content from `page.to_json` Default is set to `methods: [:content], except: [:content_cache]` For example: include fragments into json data with `config.page_to_json_options = { include: [:fragments] }`

public_auth[RW]

Module that will handle authentication for public pages

public_authorization[RW]

Module that will handle authorization against public resources

public_base_controller[RW]

Controller that Comfy::Cms::BaseController will inherit from 'ApplicationController' is the default

public_cms_path[RW]

Auto-setting parameter derived from the routes

reveal_cms_partials[RW]

Reveal partials that can be overwritten in the admin area. Default is false.

revisions_limit[RW]

Number of revisions kept. Default is 25. If you wish to disable: set this to 0.

seeds_path[RW]

Path where seeds can be located.

Public Class Methods

new() click to toggle source

Configuration defaults

# File lib/comfortable_mexican_sofa/configuration.rb, line 89
def initialize
  @cms_title              = "ComfortableMexicanSofa CMS Engine"
  @admin_base_controller  = "ApplicationController"
  @public_base_controller = "ApplicationController"
  @admin_auth             = "ComfortableMexicanSofa::AccessControl::AdminAuthentication"
  @admin_authorization    = "ComfortableMexicanSofa::AccessControl::AdminAuthorization"
  @public_auth            = "ComfortableMexicanSofa::AccessControl::PublicAuthentication"
  @public_authorization   = "ComfortableMexicanSofa::AccessControl::PublicAuthorization"
  @seed_data_path         = nil
  @admin_route_redirect   = ""
  @enable_sitemap         = true
  @enable_seeds           = false
  @seeds_path             = File.expand_path("db/cms_seeds", Rails.root)
  @revisions_limit        = 25
  @locales                = {
    "ca"    => "Català",
    "cs"    => "Česky",
    "da"    => "Dansk",
    "de"    => "Deutsch",
    "en"    => "English",
    "es"    => "Español",
    "fi"    => "Suomi",
    "fr"    => "Français",
    "gr"    => "Ελληνικά",
    "hr"    => "Hrvatski",
    "it"    => "Italiano",
    "ja"    => "日本語",
    "nb"    => "Norsk",
    "nl"    => "Nederlands",
    "pl"    => "Polski",
    "pt-BR" => "Português Brasileiro",
    "ru"    => "Русский",
    "sk"    => "Slovensky",
    "sv"    => "Svenska",
    "tr"    => "Türkçe",
    "uk"    => "Українська",
    "zh-CN" => "简体中文",
    "zh-TW" => "正體中文"
  }
  @admin_locale         = nil
  @admin_cache_sweeper  = nil
  @allow_erb            = false
  @allowed_helpers      = nil
  @allowed_partials     = nil
  @hostname_aliases     = nil
  @reveal_cms_partials  = false
  @public_cms_path      = nil
  @page_to_json_options = { methods: [:content], except: [:content_cache] }
end