fix bug with invitation to edit after access request is approved

This commit is contained in:
Devin Howard 2016-12-11 16:47:18 -05:00
parent 2bb8458e07
commit 37329734be

View file

@ -11,9 +11,9 @@ class AccessRequest < ApplicationRecord
Mailboxer::Receipt.where(notification: notification).update_all(is_read: true)
end
UserMap.create(user: user, map: map)
user_map = UserMap.create(user: user, map: map)
mail = MapMailer.invite_to_edit_email(map, map.user, user)
user.notify(mail.subject, 'invite to edit', self, true, MAILBOXER_CODE_INVITED_TO_EDIT)
user.notify(mail.subject, 'invite to edit', user_map, true, MAILBOXER_CODE_INVITED_TO_EDIT)
end
def deny