I have devise set up with custom controller (user controller), just like explained here.
I customised some of the controller logic like so
def create
super do |user|
@patient = user.build_patient
@patient.save
end
end
All of that works fine. The problem is when I try to provide custom redirect_to
, then I see
def create
super do |user|
@patient = user.build_patient
@patient.save
end
redirect_to physicians_path
end
Solutions to the general problem of having (accidental or otherwise) > 1 redirect_to
inside a controller won't work because i) I can't affect the first one (since its part of devise), and ii) I don't know how to tell it to ignore the first one and use the one I specify instead