Sha256: f40c6eb1552b428cc3274482aec293cd32da588682bf65c682793841c1802806
Contents?: true
Size: 423 Bytes
Versions: 9
Compression:
Stored size: 423 Bytes
Contents
class DomainTheme < ActiveRecord::Base validates_presence_of :name, :uri class << self def use_domain_themes? Disguise::USE_DOMAIN_FOR_THEMES end def get_theme(request) domain_theme = get_domain_theme(request) domain_theme.blank? ? nil : Theme.new(:name => domain_theme.name) end def get_domain_theme(request) self.find_by_uri(request.host) end end end
Version data entries
9 entries across 9 versions & 1 rubygems