Devise mail template for reset password

devise, ruby-on-rails-3

Solution

You need to add the logo image as an attachment.

To do so, follow the instructions in the link to override the default Devise::Mailer: https://github.com/plataformatec/devise/wiki/How-To:-Use-custom-mailer

Then, add the attachment using `attachments.inline['logo.png']=`:

def reset_password_instructions(record, opts={})
  attachments.inline['logo.png'] = File.read('app/assets/images/logo.png')
  super(record, opts)
end

And in the view you can use `attachments['logo.png'].url`:

<%= image_tag(attachments['logo.png'].url, alt: 'Logo') %>

Problem

I want to add attachment to email sent on reseting password by devise (logo image) and also I want to use user's locale to localize email text. Can anybody help and tell me what to override to do this?

Original source