Module: Aws::Rails

Defined in:
lib/aws-sdk-rails.rb,
lib/aws/rails/mailer.rb

Defined Under Namespace

Classes: Mailer, Railtie

Class Method Summary collapse

Class Method Details

.add_action_mailer_delivery_method(name = :aws_sdk, options = {}) ⇒ Object

This is called automatically from the SDK’s Railtie, but if you want to manually specify options for building the Aws::SES::Client object, you can manually call this method.

Parameters:

  • name (Symbol) (defaults to: :aws_sdk)

    The name of the ActionMailer delivery method to register.

  • options (Hash) (defaults to: {})

    The options you wish to pass on to the Aws::SES::Client initialization method.



23
24
25
26
27
# File 'lib/aws-sdk-rails.rb', line 23

def self.add_action_mailer_delivery_method(name = :aws_sdk, options = {})
  ActiveSupport.on_load(:action_mailer) do
    self.add_delivery_method(name, Aws::Rails::Mailer, options)
  end
end

.log_to_rails_loggerObject

Configures the AWS SDK for Ruby’s logger to use the Rails logger.



30
31
32
33
# File 'lib/aws-sdk-rails.rb', line 30

def self.log_to_rails_logger
  Aws.config[:logger] = ::Rails.logger
  nil
end