Class: Locomotive::Notifications

Inherits:
ActionMailer::Base
  • Object
show all
Defined in:
app/mailers/locomotive/notifications.rb

Instance Method Summary collapse

Instance Method Details

#new_content_entry(account, entry) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'app/mailers/locomotive/notifications.rb', line 6

def new_content_entry(, entry)
  @account, @entry, @type = , entry, entry.content_type

  if Locomotive.config.multi_sites_or_manage_domains?
    @domain = entry.site.domains.first
  else
    @domain = ActionMailer::Base.default_url_options[:host] || 'localhost'
  end

  subject = t('locomotive.notifications.new_content_entry.subject', domain: @domain, type: @type.name, locale: .locale)

  mail subject: subject, to: .email
end