2011-10-30 23:02:41 +00:00
|
|
|
module Locomotive
|
2011-01-18 14:24:42 +00:00
|
|
|
class Notifications < ActionMailer::Base
|
|
|
|
|
|
|
|
default :from => Locomotive.config.mailer_sender
|
|
|
|
|
2011-12-22 23:45:32 +00:00
|
|
|
def new_content_entry(account, entry)
|
2012-01-09 14:49:59 +00:00
|
|
|
@account, @entry, @type = account, entry.to_presenter, entry.content_type
|
2011-01-18 14:24:42 +00:00
|
|
|
|
2012-01-09 14:49:59 +00:00
|
|
|
subject = t('locomotive.notifications.new_content_entry.subject', :type => @type.name, :locale => account.locale)
|
2011-01-18 14:24:42 +00:00
|
|
|
|
|
|
|
mail :subject => subject, :to => account.email
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|