Add statuses to domain

This commit is contained in:
Martin Lensment 2014-08-19 13:43:01 +03:00
parent b0e9828a01
commit 32fc26b5a4
7 changed files with 60 additions and 10 deletions

View file

@ -25,6 +25,12 @@ class Domain < ActiveRecord::Base
has_and_belongs_to_many :nameservers
has_many :domain_statuses
has_many :statuses, -> {
where(setting_group: SettingGroup.domain_statuses)
}, through: :domain_statuses, source: :setting
delegate :code, to: :owner_contact, prefix: true
delegate :name, to: :registrar, prefix: true