Sha256: 0476f17f614e94694ea06e7275f9a0b3ef9e6116bfbf07b630f98a88c2e5ab97
Contents?: true
Size: 606 Bytes
Versions: 26
Compression:
Stored size: 606 Bytes
Contents
require 'mail_form' module Spotlight ## # Exhibit feedback form class ContactForm < MailForm::Base attribute :current_exhibit attribute :name, validate: false attribute :email, validate: /\A([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})\z/i attribute :message attribute :current_url append :remote_ip, :user_agent def headers { subject: "#{I18n.t(:'blacklight.application_name')} Contact Form", to: current_exhibit.contact_emails.first, from: %("#{name}" <#{email}>), cc: current_exhibit.contact_emails.join(', ') } end end end
Version data entries
26 entries across 26 versions & 1 rubygems