metamaps--metamaps/app/models/user_map.rb
2016-12-11 18:06:00 -05:00

11 lines
330 B
Ruby

# frozen_string_literal: true
class UserMap < ApplicationRecord
belongs_to :map
belongs_to :user
def mark_invite_notifications_as_read
Mailboxer::Notification.where(notified_object: self).find_each do |notification|
Mailboxer::Receipt.where(notification: notification).update_all(is_read: true)
end
end
end