Sha256: 0118b88d21b19b428a5071543ba02a4823b5e18d7c5b29aa3fff5e4855783702
Contents?: true
Size: 696 Bytes
Versions: 11
Compression:
Stored size: 696 Bytes
Contents
class Caboose::Site < ActiveRecord::Base self.table_name = "sites" has_many :site_memberships, :class_name => 'Caboose::SiteMembership', :dependent => :delete_all has_many :domains, :class_name => 'Caboose::Domain', :dependent => :delete_all has_many :post_categories, :class_name => 'Caboose::PostCategory' attr_accessible :id, :name, :description def smtp_config c = Caboose::SmtpConfig.where(:site_id => self.id).first end def self.id_for_domain(domain) d = Caboose::Domain.where(:domain => domain).first return nil if d.nil? return d.site_id end def self.sanitize_name(name) self.name = self.name.downcase.gsub(' ', '_') end end
Version data entries
11 entries across 11 versions & 1 rubygems