fix bug with UserMap notifications
This commit is contained in:
parent
9865a1e063
commit
5eb6435543
1 changed files with 3 additions and 2 deletions
|
@ -36,8 +36,9 @@ class AccessController < ApplicationController
|
|||
@map.add_new_collaborators(user_ids).each do |user_id|
|
||||
# add_new_collaborators returns array of added users,
|
||||
# who we then send an email to
|
||||
mail = MapMailer.invite_to_edit_email(@map, current_user, User.find(user_id))
|
||||
user.notify(mail.subject, 'invite to edit', UserMap.find_by(user_id: user_id, map: @map), true, MAILBOXER_CODE_INVITED_TO_EDIT)
|
||||
user = User.find(user_id)
|
||||
mail = MapMailer.invite_to_edit_email(@map, current_user, user)
|
||||
user.notify(mail.subject, 'invite to edit', UserMap.find_by(user: user, map: @map), true, MAILBOXER_CODE_INVITED_TO_EDIT)
|
||||
end
|
||||
@map.remove_old_collaborators(user_ids)
|
||||
|
||||
|
|
Loading…
Reference in a new issue