Sha256: 8aa3eb9b334f57a038cbbf3789b7e59dc118471942f4268fd66b040d3f6c7bdb
Contents?: true
Size: 753 Bytes
Versions: 26
Compression:
Stored size: 753 Bytes
Contents
class CamaleonCms::Theme < CamaleonCms::TermTaxonomy # attrs: # slug => plugin key cama_define_common_relationships('Theme') belongs_to :site, class_name: "CamaleonCms::Site", foreign_key: :parent_id default_scope { where(taxonomy: :theme) } before_validation :fix_name before_destroy :destroy_custom_fields # return theme settings configured in config.json def settings PluginRoutes.theme_info(self.slug) end # return the path to the settings file for current theme def settings_file File.join(self.settings["path"], "views/admin/settings").to_s end private def fix_name self.name = self.slug unless self.name.present? end def destroy_custom_fields self.get_field_groups.destroy_all end end
Version data entries
26 entries across 26 versions & 2 rubygems