app/models/notifications/scopes/mail_digest_before.rb
# Return notifications of the user for which mail digest is to be sent and that is created before
# the specified time.
Return notifications of the user for which mail digest is to be sent and that is created before
the specified time.
Return notifications of the user for which mail digest is to be sent and that is created before the specified time .
def mail_digest_before(recipient:, time:)
        where(Notification.arel_table[:created_at].lteq(time))
          .where(recipient: recipient)
          .where(read_mail_digest: false)
      end
def mail_digest_before ( recipient : , time : ) where ( Notification . arel_table [ :created_at ] . lteq ( time ) ) . where ( recipient : recipient ) . where ( read_mail_digest : false ) end
Return notifications of the user for which mail digest is to be sent and that is created before
the specified time.
Return notifications of the user for which mail digest is to be sent and that is created before the specified time .
recipient
time