Show More
Commit Description:
update new list of users
Commit Description:
update new list of users
References:
File last commit:
Show/Diff file:
Action:
app/models/group.rb
| 20 lines
| 482 B
| text/x-ruby
| RubyLexer
|
r672 | class Group < ActiveRecord::Base | |||
r751 | has_many :groups_problems, class_name: 'GroupProblem' | |||
r678 | has_many :problems, :through => :groups_problems | |||
r751 | has_many :groups_users, class_name: 'GroupUser' | |||
r678 | has_many :users, :through => :groups_users | |||
#has_and_belongs_to_many :problems | ||||
#has_and_belongs_to_many :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 | ||||
r678 | ||||
r672 | end | |||