Method: ActivityNotification.configure

Defined in:
lib/activity_notification.rb

.configure {|config| ... } ⇒ Object

Sets global configuration options for ActivityNotification. All available options and their defaults are in the example below:

Examples:

Initializer for Rails

ActivityNotification.configure do |config|
  config.enabled            = true
  config.table_name         = "notifications"
  config.email_enabled      = false
  config.mailer_sender      = nil
  config.mailer             = 'ActivityNotification::Mailer'
  config.parent_mailer      = 'ActionMailer::Base'
  config.parent_controller  = 'ApplicationController'
  config.opened_index_limit = 10
end

Yields:



45
46
47
48
# File 'lib/activity_notification.rb', line 45

def self.configure
  yield(config) if block_given?
  autoload :Association, "activity_notification/orm/#{ActivityNotification.config.orm}"
end