Sha256: 9e901d75c745f7c5971313ddf5051216c639d0be3d9df8202064afd34bc15d81

Contents?: true

Size: 1.27 KB

Versions: 5

Compression:

Stored size: 1.27 KB

Contents

EffectiveEmailTemplates.setup do |config|
  # Configure Database Tables
  config.email_templates_table_name = :email_templates

  # Authorization Method
  #
  # This method is called by all controller actions with the appropriate action and resource
  # If the method returns false, an Effective::AccessDenied Error will be raised (see README.md for complete info)
  #
  # Use via Proc (and with CanCan):
  # config.authorization_method = Proc.new { |controller, action, resource| can?(action, resource) }
  #
  # Use via custom method:
  # config.authorization_method = :my_authorization_method
  #
  # And then in your application_controller.rb:
  #
  # def my_authorization_method(action, resource)
  #   current_user.is?(:admin)
  # end
  #
  # Or disable the check completely:
  # config.authorization_method = false
  config.authorization_method = Proc.new { |controller, action, resource| authorize!(action, resource) } # CanCanCan

  # Layout Settings
  # Configure the Layout per controller, or all at once

  # config.layout = 'application'   # All EffectiveEmailTemplates controllers will use this layout
  config.layout = {
    email_templates: 'application',
    admin_email_templates: 'admin'
  }

  # Not allowed to select text/html by default
  config.select_content_type = false

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
effective_email_templates-1.0.13 config/effective_email_templates.rb
effective_email_templates-1.0.12 config/effective_email_templates.rb
effective_email_templates-1.0.11 config/effective_email_templates.rb
effective_email_templates-1.0.10 config/effective_email_templates.rb
effective_email_templates-1.0.9 config/effective_email_templates.rb