Sha256: e676fb75a908dd08c472c286f8b55391c27293f301bf63805a66fbde98bd6a6f

Contents?: true

Size: 1.56 KB

Versions: 23

Compression:

Stored size: 1.56 KB

Contents

EffectiveLogging.setup do |config|
  # Configure Database Tables
  config.logs_table_name = :logs

  # 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| true }  # All users can see every screen

  # Register Effective::Logs with ActiveAdmin if ActiveAdmin is present
  config.use_active_admin = true

  # Admin Screens Layout Settings
  config.layout = 'application'   # All EffectiveLogging controllers will use this layout

  # All statuses defined here, as well as 'info', 'success', and 'error' (hardcoded) will be created as
  # EffectiveLogger.info('my message') macros
  config.additional_statuses = []

  #########################################
  #### Automatic Logging Functionality ####
  #########################################

  # Log all emails sent
  config.emails_enabled = true

  # Log all successful user login attempts
  config.user_logins_enabled = true

end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
effective_logging-1.5.7 lib/generators/templates/effective_logging.rb
effective_logging-1.5.6 lib/generators/templates/effective_logging.rb
effective_logging-1.5.5 lib/generators/templates/effective_logging.rb
effective_logging-1.5.4 lib/generators/templates/effective_logging.rb
effective_logging-1.5.3 lib/generators/templates/effective_logging.rb
effective_logging-1.5.2 lib/generators/templates/effective_logging.rb
effective_logging-1.5.1 lib/generators/templates/effective_logging.rb
effective_logging-1.5.0 lib/generators/templates/effective_logging.rb
effective_logging-1.4.1 lib/generators/templates/effective_logging.rb
effective_logging-1.4.0 lib/generators/templates/effective_logging.rb
effective_logging-1.3.1 lib/generators/templates/effective_logging.rb
effective_logging-1.3.0 lib/generators/templates/effective_logging.rb
effective_logging-1.2.6 lib/generators/templates/effective_logging.rb
effective_logging-1.2.5 lib/generators/templates/effective_logging.rb
effective_logging-1.2.4 lib/generators/templates/effective_logging.rb
effective_logging-1.2.3 lib/generators/templates/effective_logging.rb
effective_logging-1.2.2 lib/generators/templates/effective_logging.rb
effective_logging-1.2.1 lib/generators/templates/effective_logging.rb
effective_logging-1.2.0 lib/generators/templates/effective_logging.rb
effective_logging-1.1.3 lib/generators/templates/effective_logging.rb