Show More
Commit Description:
update new list of users
Commit Description:
update new list of users
File last commit:
Show/Diff file:
Action:
app/models/group.rb | 20 lines | 482 B | text/x-ruby | RubyLexer |
add problem group
r672 class Group < ActiveRecord::Base
start update to 5.2
r751 has_many :groups_problems, class_name: 'GroupProblem'
make group_user and group_problem unique
r678 has_many :problems, :through => :groups_problems
start update to 5.2
r751 has_many :groups_users, class_name: 'GroupUser'
make group_user and group_problem unique
r678 has_many :users, :through => :groups_users
#has_and_belongs_to_many :problems
#has_and_belongs_to_many :users
update new list of users
r808 def add_users_skip_existing(users_list)
new_list = []
users_list.each do |u|
new_list << u unless users.include? u
end
users << new_list
end
make group_user and group_problem unique
r678
add problem group
r672 end