Class: Effective::PostsMailer

Inherits:
Object
  • Object
show all
Includes:
EffectiveMailer
Defined in:
app/mailers/effective/posts_mailer.rb

Instance Method Summary collapse

Instance Method Details

#post_submitted(resource, opts = {}) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'app/mailers/effective/posts_mailer.rb', line 7

def (resource, opts = {})
  raise('expected an Effective::Post') unless resource.kind_of?(Effective::Post)

  @post = resource
  subject = subject_for(__method__, 'Post Submitted', resource, opts)
  headers = headers_for(resource, opts)

  mail(to: mailer_admin, subject: subject, **headers)
end