Sha256: b470d1a2577163b3c5145c2cb00bbdd58842a9c0bbdad58a4abd0762f7053e9d

Contents?: true

Size: 538 Bytes

Versions: 8

Compression:

Stored size: 538 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
  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
  
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
caboose-cms-0.4.72 app/models/caboose/site.rb
caboose-cms-0.4.71 app/models/caboose/site.rb
caboose-cms-0.4.70 app/models/caboose/site.rb
caboose-cms-0.4.69 app/models/caboose/site.rb
caboose-cms-0.4.68 app/models/caboose/site.rb
caboose-cms-0.4.67 app/models/caboose/site.rb
caboose-cms-0.4.66 app/models/caboose/site.rb
caboose-cms-0.4.65 app/models/caboose/site.rb