metamaps--metamaps/app/models/user_map.rb

12 lines
325 B
Ruby
Raw Normal View History

2016-09-24 03:00:46 +00:00
# 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).each do |notification|
Mailboxer::Receipt.where(notification: notification).update_all(is_read: true)
end
end
end