Class: Europeana::FeedbackButton::FeedbackMailer

Inherits:
ApplicationMailer
  • Object
show all
Includes:
FeedbackHelper
Defined in:
app/mailers/europeana/feedback_button/feedback_mailer.rb

Instance Method Summary collapse

Methods included from FeedbackHelper

#feedback_enabled?

Instance Method Details

#post(text:, type:, page:, ip:) ⇒ Object



7
8
9
10
11
12
13
14
15
16
# File 'app/mailers/europeana/feedback_button/feedback_mailer.rb', line 7

def post(text:, type:, page:, ip:)
  fail Errors::NoRecipient unless feedback_enabled?

  @text = text
  @type = type
  @page = page
  @ip = ip

  mail(to: Rails.application.config.x.feedback_mail_to, subject: text.truncate(100, separator: ' '))
end