def mention_users
      mentions ||= begin
                     regex = /@([\w]+)/
                     self.body.scan(regex).flatten
                   end
      mentioned_users ||= User.where(username: mentions)

      if mentioned_users.any?
        mentioned_users.each do |i|
          FiatNotifications::Notification::CreateNotificationJob.set(wait: 5.seconds).perform_later(
            self,
            self.authorable,
            i,
            action: "mentioned",
            notified_type: "User",
            notified_ids: [i.id],
            email_template_id: FiatNotifications.email_template_id,
            email_subject: "You were mentioned: '#{self.commentable.subject}' on #{l self.created_at, format: :complete}",
            email_body: "#{self.body}",
            reply_to_address: FiatNotifications.reply_to_email_address
          )
        end
      end
    end
def mention_users
      mentions ||= begin
                     regex = /@([\w]+)/
                     self.body.scan(regex).flatten
                   end
      mentioned_users ||= User.where(username: mentions)

      if mentioned_users.any?
        mentioned_users.each do |i|
          FiatNotifications::Notification::CreateNotificationJob.set(wait: 5.seconds).perform_later(
            self,
            self.authorable,
            i,
            action: "mentioned",
            notified_type: "User",
            notified_ids: [i.id],
            email_template_id: FiatNotifications.email_template_id,
            email_subject: "You were mentioned: '#{self.commentable.subject}' on #{l self.created_at, format: :complete}",
            email_body: "#{self.body}",
            reply_to_address: FiatNotifications.reply_to_email_address
          )
        end
      end
    end
Ideally, this would be polymorphic-enabled