summaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/group.rb6
-rw-r--r--app/models/user.rb6
2 files changed, 8 insertions, 4 deletions
diff --git a/app/models/group.rb b/app/models/group.rb
index d1b2cb966..3e4bdf09a 100644
--- a/app/models/group.rb
+++ b/app/models/group.rb
@@ -18,8 +18,10 @@
class Group < Principal
include Redmine::SafeAttributes
- has_and_belongs_to_many :users, :after_add => :user_added,
- :after_remove => :user_removed
+ has_and_belongs_to_many :users,
+ :join_table => "#{table_name_prefix}groups_users#{table_name_suffix}",
+ :after_add => :user_added,
+ :after_remove => :user_removed
acts_as_customizable
diff --git a/app/models/user.rb b/app/models/user.rb
index 9020295d0..74528aa6d 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -68,8 +68,10 @@ class User < Principal
['none', :label_user_mail_option_none]
]
- has_and_belongs_to_many :groups, :after_add => Proc.new {|user, group| group.user_added(user)},
- :after_remove => Proc.new {|user, group| group.user_removed(user)}
+ has_and_belongs_to_many :groups,
+ :join_table => "#{table_name_prefix}groups_users#{table_name_suffix}",
+ :after_add => Proc.new {|user, group| group.user_added(user)},
+ :after_remove => Proc.new {|user, group| group.user_removed(user)}
has_many :changesets, :dependent => :nullify
has_one :preference, :dependent => :destroy, :class_name => 'UserPreference'
has_one :rss_token, :class_name => 'Token', :conditions => "action='feeds'"