Sha256: 05d8a21184b2a5325ffcc7df8ee26edd05b07f33acd1920f33f5151eaf3cde41
Contents?: true
Size: 1.31 KB
Versions: 17
Compression:
Stored size: 1.31 KB
Contents
module Refinery module <%= namespacing %> class Setting < Refinery::Core::BaseModel class << self def confirmation_body Refinery::Setting.find_or_set(:<%= singular_name %>_confirmation_body, "Thank you for your <%= singular_name.humanize.downcase %> %name%,\n\nThis email is a receipt to confirm we have received your <%= singular_name.humanize.downcase %> and we'll be in touch shortly.\n\nThanks." ) end def confirmation_subject Refinery::Setting.find_or_set(:<%= singular_name %>_confirmation_subject, "Thank you for your <%= singular_name.humanize.downcase %>") end def confirmation_subject=(value) Refinery::Setting.set(:<%= singular_name %>_confirmation_subject, value) end def notification_recipients Refinery::Setting.find_or_set(:<%= singular_name %>_notification_recipients, (Role[:refinery].users.first.try(:email) if defined?(Role)).to_s) end def notification_subject Refinery::Setting.find_or_set(:<%= singular_name %>_notification_subject, "New <%= singular_name.humanize.downcase %> from your website") end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems