Sha256: 8e67e8f381b231cee84e837750419ed15d80a1cf5c000936e8f7bf19ac9b6858

Contents?: true

Size: 1.69 KB

Versions: 11

Compression:

Stored size: 1.69 KB

Contents

EffectiveEmailTemplates.setup do |config|
  # Database table name to store email_templates in.  Default is :email_templates
  config.email_templates_table_name = :email_templates

  # SimpleForm Options
  # This Hash of options will be passed into any simple_form_for() calls
  config.simple_form_options = {}

  # config.simple_form_options = {
  #   :html => {:class => 'form-horizontal'},
  #   :wrapper => :horizontal_form,
  #   :wrapper_mappings => {
  #     :boolean => :horizontal_boolean,
  #     :check_boxes => :horizontal_radio_and_checkboxes,
  #     :radio_buttons => :horizontal_radio_and_checkboxes
  #   }
  # }

  # 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 => 'application'
  }


  # 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


end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
effective_email_templates-0.6.1 config/effective_email_templates.rb
effective_email_templates-0.6.0 config/effective_email_templates.rb
effective_email_templates-0.5.1 config/effective_email_templates.rb
effective_email_templates-0.5.0 config/effective_email_templates.rb
effective_email_templates-0.4.6 config/effective_email_templates.rb
effective_email_templates-0.4.5 config/effective_email_templates.rb
effective_email_templates-0.4.4 config/effective_email_templates.rb
effective_email_templates-0.4.3 config/effective_email_templates.rb
effective_email_templates-0.4.2 config/effective_email_templates.rb
effective_email_templates-0.4.1 config/effective_email_templates.rb
effective_email_templates-0.4.0 config/effective_email_templates.rb