Class: SiteFramework::Domain
- Inherits:
-
Object
- Object
- SiteFramework::Domain
- Includes:
- Mongoid::Document, Mongoid::Timestamps
- Defined in:
- app/models/site_framework/domain.rb
Overview
This model represent a Domain. Each domain belongs to a [Site] model and may or may not belongs to another Domain
Constant Summary collapse
- PATTERN =
/\A[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?\z/ix
Instance Method Summary collapse
Instance Method Details
#normalize_name ⇒ Object
39 40 41 |
# File 'app/models/site_framework/domain.rb', line 39 def normalize_name self.name = name.downcase end |
#parent ⇒ Object
21 22 23 |
# File 'app/models/site_framework/domain.rb', line 21 def parent # TODO: return a domain with alias == false end |