Sometimes you may want to change the subject of a devise email. This also works with devise_invitable. Its pretty simple.
First tell devise we want to use a custom controller:
# app/mailers/custom_devise_mailer.rb:
class CustomDeviseMailer < Devise::Mailer
protected
def subject_for(key)
if key.to_s == 'invitation_instructions'
"You have been invited to Super Awesome App"
else
return super
end
end
end
Related External Links: