Rails: DoubleRenderError - "Render and/or redirect were called multiple times in this action"
You shouldn't return redirect_to
in the after_sign_in_path_for
. You should return url:
def after_sign_in_path_for(user)
if current_user.role_ids == [2]
return workers_url
else
return tasksadmins_url
end
end