Sha256: a00b5c849e1ee8997c0e04dc0bd64b488aceccb40abed6cebe14b163c20816d5
Contents?: true
Size: 633 Bytes
Versions: 9
Compression:
Stored size: 633 Bytes
Contents
# TODO: Use deliver_later to avoid slowness and errors class EmailNotify def self.logger @@logger ||= ::Rails.logger || Logger.new(STDOUT) end def self.send_comment(comment, user) return if user.email.blank? email = NotificationMailer.comment(comment, user) email.deliver_now end def self.send_article(article, user) return if user.email.blank? email = NotificationMailer.article(article, user) email.deliver_now end # Send a welcome mail to the user created def self.send_user_create_notification(user) email = NotificationMailer.notif_user(user) email.deliver_now end end
Version data entries
9 entries across 9 versions & 1 rubygems