Sha256: 956fc540477d022d1d512e9428673b3d4918b8fc2b6d2ac99e870cade5cd7eb0

Contents?: true

Size: 1.19 KB

Versions: 8

Compression:

Stored size: 1.19 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'
  }

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
effective_email_templates-1.0.8 config/effective_email_templates.rb
effective_email_templates-1.0.7 config/effective_email_templates.rb
effective_email_templates-1.0.6 config/effective_email_templates.rb
effective_email_templates-1.0.5 config/effective_email_templates.rb
effective_email_templates-1.0.4 config/effective_email_templates.rb
effective_email_templates-1.0.3 config/effective_email_templates.rb
effective_email_templates-1.0.2 config/effective_email_templates.rb
effective_email_templates-1.0.1 config/effective_email_templates.rb