Displaying 1 result from an estimated 1 matches for "devise_or_application".
2012 May 17
0
Two layouts in one mailer
Hi all,
I''m having problems figuring out how to know which mailer method is being
invoked in the layout callback.
In my controller, I have code like this and its working great:
class Users::RegistrationsController < Devise::RegistrationsController
layout :devise_or_application
def devise_or_application
["edit", "update", "destroy"].include?(params[:action]) ?
"application" : "devise"
end
end
Now I need the same thing for my mailer, but params[:action] is not
available in mailers. Is there another way t...