plataformatec/devise — pull request #1674 by ylansegal (2012-02-22 18:49:01+00:00)
Title: Devise.mailer_sender proc can be passed resource

This adds the following functionality when configuring a mailer_sender proc:

```
Devise.setup do |config|
config.mailer_sender = Proc.new { |devise_mapping_name, resource|
# do some stuff here with the devise_mapping_name and the resource
}
end
```

The use case us so that the mailer sender can be selected based on the resource and not just the mapping_name. It's also backwards compatible, so the proc can still be called as in the past

```
Devise.setup do |config|
config.mailer_sender = Proc.new { |devise_mapping_name|
# do some stuff here with the devise_mapping_name
}
end
```

Thanks