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

12 lines
330 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
2016-12-11 22:29:48 +00:00
Mailboxer::Notification.where(notified_object: self).find_each do |notification|
Mailboxer::Receipt.where(notification: notification).update_all(is_read: true)
end
end
end