diff options
author | Peter Kozak <spag@golwen.net> | 2013-03-06 09:12:05 -0500 |
---|---|---|
committer | Peter Kozak <spag@golwen.net> | 2013-03-06 09:12:05 -0500 |
commit | 3c3f90f4b43a41187dd65af3fe08e0409b30b68a (patch) | |
tree | bc49468cf8e735dc8e052e75effad61584c7d91f /app/models/tenant.rb | |
parent | 287e9d8fe964b0b0449732597f1f5ef5057cf4b3 (diff) |
tenant can have groups
Diffstat (limited to 'app/models/tenant.rb')
-rw-r--r-- | app/models/tenant.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/tenant.rb b/app/models/tenant.rb index 0622f52..ffa68a7 100644 --- a/app/models/tenant.rb +++ b/app/models/tenant.rb @@ -59,6 +59,10 @@ class Tenant < ActiveRecord::Base has_many :users_fax_accounts, :through => :users, :source => :fax_accounts, :readonly => true has_many :users_fax_accounts_phone_numbers, :through => :users_fax_accounts, :source => :phone_numbers, :readonly => true + # Groups + has_many :group_memberships, :as => :item, :dependent => :destroy, :uniq => true + has_many :groups, :through => :group_memberships + # Validations: # validates_presence_of :name, :state, :country, :language |