Sha256: bcc3b3b92a0fb3b49ced918694e1a65ac3bee45387d0e5390a7107964e2c6a45
Contents?: true
Size: 693 Bytes
Versions: 9
Compression:
Stored size: 693 Bytes
Contents
module Pageflow class Theming < ActiveRecord::Base belongs_to :account has_many :widgets, as: :subject has_many :entries scope :with_home_url, -> { where.not(home_url: '') } scope :for_request, ->(request) { Pageflow.config.theming_request_scope.call(all, request) } validates :account, :presence => true validates_inclusion_of :theme_name, :in => ->(_) { Pageflow.config.themes.names } def cname_domain cname.split('.').pop(2).join('.') end def theme Pageflow.config.themes.get(theme_name) end def name I18n.t('pageflow.admin.themings.name', :account_name => account.name, :theme_name => theme_name) end end end
Version data entries
9 entries across 9 versions & 1 rubygems