Merge branch 'master' into master-to-rails3
Conflicts: Gemfile README_DEVEL app/controllers/articles_controller.rb app/controllers/orders_controller.rb app/controllers/tasks_controller.rb app/models/task.rb app/views/articles/_import_search_results.haml app/views/articles/index.haml app/views/messages/new.haml app/views/ordering/_order_head.haml app/views/ordering/my_order_result.haml app/views/orders/show.haml app/views/stockit/new.html.haml db/schema.rb
This commit is contained in:
commit
0edd29dfd4
15 changed files with 44 additions and 22 deletions
|
|
@ -59,9 +59,10 @@ class Task < ActiveRecord::Base
|
|||
|
||||
# Get users from comma seperated ids
|
||||
# and makes the users responsible for the task
|
||||
# TODO: check for maximal number of users
|
||||
def user_list=(ids)
|
||||
list = ids.split(",")
|
||||
new_users = list - users.collect(&:id)
|
||||
new_users = (list - users.collect(&:id)).uniq
|
||||
old_users = users.reject { |user| list.include?(user.id) }
|
||||
|
||||
logger.debug "[debug] New users: #{new_users}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue