Commit afcda1fc authored by marutosijp's avatar marutosijp

explicitly define fix has_and_belongs_to_many join_table at Group and User

Rails4 cannot resolve automatically.

git-svn-id: https://svn.redmine.org/redmine/trunk@12471 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent bd367da4
......@@ -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
......
......@@ -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'"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment