plataformatec/devise — Issue #1711: devise not using my custom mailers
Author: homanchou
Created: 2012-03-10 06:31:46+00:00
State: open

I upgraded from rails 3.1, devise 1.4.6, devise_invitable 0.6.1
to rails 3.2.2, devise 2.0.4 and devise_invitable 1.0.0

after the upgrade invitations are now sent using the default mailing template instead of my custom template in app/views/artists/mailer/invitation_instructions.html.erb

routes.rb:

devise_for :artists, :path => :accounts, :controllers => {:sessions => "artists/sessions",
:registrations => "artists/registrations",
:invitations => "artists/invitations",
:confirmations => "artists/confirmations" }

mappings:

Loading development environment (Rails 3.2.2)
ruby-1.9.3-preview1 :001 > y Devise.mappings[:artist]
--- !ruby/object:Devise::Mapping
scoped_path: artists
singular: :artist
class_name: Artist
klass: !ruby/object:Devise::Getter
name: Artist
path: accounts
path_prefix:
sign_out_via: :delete
format:
failure_app: !ruby/class 'Devise::FailureApp'
controllers:
:sessions: artists/sessions
:registrations: artists/registrations
:invitations: artists/invitations
:confirmations: artists/confirmations
:passwords: devise/passwords
path_names:
:registration: ''
:new: new
:edit: edit
:sign_in: sign_in
:sign_out: sign_out
:password: password
:sign_up: sign_up
:cancel: cancel
:confirmation: confirmation
:invitation: invitation
:accept: accept
modules:
- :database_authenticatable
- :rememberable
- :recoverable
- :registerable
- :validatable
- :confirmable
- :trackable
- :invitable
routes: &2174274780
- :session
- :password
- :registration
- :confirmation
- :invitation
used_routes:
- :session
- :password
- :registration
- :confirmation
- :invitation
used_helpers: *2174274780
strategies:
- :rememberable
- :database_authenticatable
=> nil

file locations:

app/views/artists/
|-- _follows.html.erb
|-- _form.html.erb
|-- confirmations
| `-- new.html.erb
|-- index.html.erb
|-- invitations
| |-- edit.html.erb
| `-- new.html.erb
|-- mailer
| |-- confirmation_instructions.html.erb
| |-- invitation_instructions.html.erb
| |-- reset_password_instructions.html.erb
| `-- unlock_instructions.html.erb
|-- passwords
| |-- edit.html.erb
| `-- new.html.erb
|-- registrations
| |-- _form.html.erb
| |-- edit.html.erb
| `-- new.html.erb
|-- sessions
| `-- new.html.erb
|-- shared
| `-- _links.erb
|-- show.html.erb
|-- show.rss.builder
`-- unlocks
`-- new.html.erb

I just tested my email confirmation and that email is also not using my custom template. So it appears to be a devise issue and not a devise_invitable issue.