Sha256: c8db09bd39daafb14f576497b82f13f9d6a43712f069ade969c383039c6813b1
Contents?: true
Size: 575 Bytes
Versions: 6
Compression:
Stored size: 575 Bytes
Contents
require 'mail_form' module Spotlight 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
6 entries across 6 versions & 1 rubygems