Sha256: a34dc0b3ee8574ca90c90b502d31e2f32aeb26194c95a98cf0801423c484b986
Contents?: true
Size: 1.11 KB
Versions: 11
Compression:
Stored size: 1.11 KB
Contents
class InquirySetting < ActiveRecord::Base def self.confirmation_body RefinerySetting.find_or_set(:inquiry_confirmation_body, "Thank you for your inquiry %name%,\n\nThis email is a receipt to confirm we have received your inquiry and we'll be in touch shortly.\n\nThanks." ) end def self.confirmation_subject RefinerySetting.find_or_set(:inquiry_confirmation_subject, "Thank you for your inquiry") end def self.confirmation_subject=(value) # handles a change in Refinery API if RefinerySetting.methods.map(&:to_sym).include?(:set) RefinerySetting.set(:inquiry_confirmation_subject, value) else RefinerySetting[:inquiry_confirmation_subject] = value end end def self.notification_recipients RefinerySetting.find_or_set(:inquiry_notification_recipients, ((Role[:refinery].users.first.email rescue nil) if defined?(Role)).to_s) end def self.notification_subject RefinerySetting.find_or_set(:inquiry_notification_subject, "New inquiry from your website") end end
Version data entries
11 entries across 11 versions & 2 rubygems