class Notifier

def confirmation_instructions(record)

updated, and also when confirmation is manually requested
Deliver confirmation instructions when the user is created or its email is
def confirmation_instructions(record)
  setup_mail(record, :confirmation_instructions)
end

def reset_password_instructions(record)

Deliver reset password instructions when manually requested
def reset_password_instructions(record)
  setup_mail(record, :reset_password_instructions)
end

def setup_mail(record, key)

Configure default email options
def setup_mail(record, key)
  subject      translate(record, key)
  from         self.class.sender
  recipients   record.email
  sent_on      Time.now
  content_type 'text/html'
  body         underscore_name(record) => record, :resource => record
end

def translate(record, key)

confirmation_instructions: '...'
notifier:
user:
confirmation_instructions: '...'
notifier:
devise:
en:

Example (i18n locale file):
messages using specific resource scope, or provide a default one.
Setup subject namespaced by model. It means you're able to setup your
def translate(record, key)
  I18n.t(:"#{underscore_name(record)}.#{key}",
         :scope => [:devise, :notifier],
         :default => key)
end

def underscore_name(record)

def underscore_name(record)
  @underscore_name ||= record.class.name.underscore.to_sym
end