summaryrefslogtreecommitdiff
path: root/app/models/tenant.rb
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-03-07 11:37:03 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-03-07 11:37:03 +0100
commit11f186a118285fbc87a536af26730780a9ad01f5 (patch)
treefe6363b036f60f238916d070b3d0cb0625dd53c8 /app/models/tenant.rb
parent2b94b16ee1201d15b3b9d66e142df311141a47db (diff)
parent3e19646f46c772e10ed3d7a45e8c974ab23f625b (diff)
Merge branch 'develop'5.1.1
Diffstat (limited to 'app/models/tenant.rb')
-rw-r--r--app/models/tenant.rb4
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