Module: Refinery::Core

Includes:
ActiveSupport::Configurable
Defined in:
core/lib/refinery/core.rb,
core/lib/refinery/core/engine.rb,
core/lib/refinery/core/nil_user.rb,
core/lib/refinery/users_manager.rb,
core/lib/refinery/core/configuration.rb,
core/lib/refinery/core/default_route.rb,
core/spec/features/refinery/core_spec.rb,
core/app/models/refinery/core/base_model.rb,
core/spec/lib/refinery/core/nil_user_spec.rb,
core/spec/lib/refinery/users_manager_spec.rb,
core/lib/refinery/core/authorisation_adapter.rb,
core/lib/refinery/core/authorisation_manager.rb,
core/spec/lib/refinery/core/configuration_spec.rb,
core/spec/lib/refinery/authorisation_manager_spec.rb

Defined Under Namespace

Classes: AuthorisationAdapter, AuthorisationManager, BaseModel, DefaultRoute, Engine, NilUser, Stylesheet, UsersManager

Class Method Summary collapse

Class Method Details

.backend_pathObject



59
60
61
# File 'core/lib/refinery/core/configuration.rb', line 59

def backend_path
  [mounted_path.gsub(%r{/\z}, ''), backend_route].join("/")
end

.backend_routeObject



53
54
55
56
# File 'core/lib/refinery/core/configuration.rb', line 53

def backend_route
  # prevent / at the start.
  config.backend_route.to_s.gsub(%r{\A/}, '')
end

.clear_javascripts!Object



63
64
65
# File 'core/lib/refinery/core/configuration.rb', line 63

def clear_javascripts!
  self.javascripts = []
end

.clear_stylesheets!Object



67
68
69
# File 'core/lib/refinery/core/configuration.rb', line 67

def clear_stylesheets!
  self.stylesheets = []
end

.dragonfly_custom_backend?Boolean

Returns:

  • (Boolean)


71
72
73
# File 'core/lib/refinery/core/configuration.rb', line 71

def dragonfly_custom_backend?
  config.dragonfly_custom_backend_class.present?
end

.dragonfly_custom_backend_classObject



75
76
77
# File 'core/lib/refinery/core/configuration.rb', line 75

def dragonfly_custom_backend_class
  config.dragonfly_custom_backend_class.constantize if dragonfly_custom_backend?
end

.rootObject



14
15
16
# File 'core/lib/refinery/core.rb', line 14

def root
  @root ||= Pathname.new(File.expand_path('../../../', __FILE__))
end

.site_nameObject



79
80
81
# File 'core/lib/refinery/core/configuration.rb', line 79

def site_name
  ::I18n.t('site_name', :scope => 'refinery.core.config', :default => config.site_name)
end

.wymeditor_whitelist_tags=(tags) ⇒ Object



83
84
85
# File 'core/lib/refinery/core/configuration.rb', line 83

def wymeditor_whitelist_tags=(tags)
  raise "Please ensure refinerycms-wymeditor is being used and use Refinery::Wymeditor.whitelist_tags instead of Refinery::Core.wymeditor_whitelist_tags"
end