From 3c3f90f4b43a41187dd65af3fe08e0409b30b68a Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Wed, 6 Mar 2013 09:12:05 -0500 Subject: tenant can have groups --- app/models/tenant.rb | 4 ++++ 1 file changed, 4 insertions(+) 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 -- cgit v1.2.3