summaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/role.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/role.rb b/app/models/role.rb
index 8a984bbba..790d09f27 100644
--- a/app/models/role.rb
+++ b/app/models/role.rb
@@ -68,6 +68,8 @@ class Role < ActiveRecord::Base
:join_table => "#{table_name_prefix}roles_managed_roles#{table_name_suffix}",
:association_foreign_key => "managed_role_id"
+ has_and_belongs_to_many :queries, :join_table => "#{table_name_prefix}queries_roles#{table_name_suffix}", :foreign_key => "role_id"
+
has_many :member_roles, :dependent => :destroy
has_many :members, :through => :member_roles
acts_as_positioned :scope => :builtin