Module: RailsAdminCMS::Config

Extended by:
Config
Included in:
Config
Defined in:
lib/rails_admin_cms/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#custom_form_max_sizeObject



37
38
39
# File 'lib/rails_admin_cms/config.rb', line 37

def custom_form_max_size
  @custom_form_max_size || 20
end

#parent_controllerObject



21
22
23
# File 'lib/rails_admin_cms/config.rb', line 21

def parent_controller
  @parent_controller || ::ApplicationController
end

#parent_mailerObject



25
26
27
28
29
30
31
# File 'lib/rails_admin_cms/config.rb', line 25

def parent_mailer
  @parent_mailer || "::ApplicationMailer".safe_constantize || Struct.new(:mailer) {
    def send_email(_form)
      mailer
    end
  }.new(Struct.new(:deliver_now).new(nil))
end

#with_email_body=(value) ⇒ Object (writeonly)

Sets the attribute with_email_body

Parameters:

  • value

    the value to set the attribute with_email_body to.



13
14
15
# File 'lib/rails_admin_cms/config.rb', line 13

def with_email_body=(value)
  @with_email_body = value
end

#with_paper_trail=(value) ⇒ Object (writeonly)

Sets the attribute with_paper_trail

Parameters:

  • value

    the value to set the attribute with_paper_trail to.



13
14
15
# File 'lib/rails_admin_cms/config.rb', line 13

def with_paper_trail=(value)
  @with_paper_trail = value
end

Instance Method Details

#with_email_body?Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/rails_admin_cms/config.rb', line 41

def with_email_body?
  @with_email_body
end

#with_paper_trail?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/rails_admin_cms/config.rb', line 33

def with_paper_trail?
  @with_paper_trail
end