Class: Caboose::Site
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Caboose::Site
- Defined in:
- app/models/caboose/site.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.id_for_domain(domain) ⇒ Object
21 22 23 24 25 |
# File 'app/models/caboose/site.rb', line 21 def self.id_for_domain(domain) d = Caboose::Domain.where(:domain => domain).first return nil if d.nil? return d.site_id end |
.sanitize_name(name) ⇒ Object
27 28 29 |
# File 'app/models/caboose/site.rb', line 27 def self.sanitize_name(name) self.name = self.name.downcase.gsub(' ', '_') end |
Instance Method Details
#primary_domain ⇒ Object
31 32 33 |
# File 'app/models/caboose/site.rb', line 31 def primary_domain Caboose::Domain.where(:site_id => self.id, :primary => true).first end |
#smtp_config ⇒ Object
13 14 15 |
# File 'app/models/caboose/site.rb', line 13 def smtp_config c = Caboose::SmtpConfig.where(:site_id => self.id).first end |
#social_config ⇒ Object
17 18 19 |
# File 'app/models/caboose/site.rb', line 17 def s = Caboose::SocialConfig.where(:site_id => self.id).first end |