Sha256: 0a0eb92bbdf6589d20f3ac29ea05a772dc5acda6ee6a3b8559d223bd0ccd84a9

Contents?: true

Size: 462 Bytes

Versions: 9

Compression:

Stored size: 462 Bytes

Contents

module Form
  class Email < ActiveRecord::Base
    include Admin::Form::Email

    self.table_name_prefix = 'form_'

    has_one :structure

    def subject
      send("subject_#{I18n.locale}").presence || I18n.t('cms.form.email.default_subject')
    end

    def body
      send("body_#{I18n.locale}").presence || I18n.t('cms.form.email.default_body')
    end

    def send_to
      read_attribute(:send_to).presence || Setting[:cms_mail_bcc]
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rails_admin_cms-0.1.1 app/models/form/email.rb
rails_admin_cms-0.0.9 app/models/form/email.rb
rails_admin_cms-0.0.7 app/models/form/email.rb
rails_admin_cms-0.0.6 app/models/form/email.rb
rails_admin_cms-0.0.5 app/models/form/email.rb
rails_admin_cms-0.0.4 app/models/form/email.rb
rails_admin_cms-0.0.3 app/models/form/email.rb
rails_admin_cms-0.0.2 app/models/form/email.rb
rails_admin_cms-0.0.1 app/models/form/email.rb