Skip to content

Using this gem with Rails should be documented #135

@skalee

Description

@skalee

This gem works with Rails nicely, however it requires a small additional step, which isn't obvious. A short README section is required at minimum.

For reference, the easiest way to use EnMail in Rails is to register an interceptor. Voilà:

class CryptoInterceptor
  def self.delivering_email(message)
    adapter = EnMail::Adapters::RNP
    EnMail.protect :sign, message, adapter: adapter
  end
end

ActionMailer::Base.register_interceptor(CryptoInterceptor)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions