in my controller registrations_controller.rb in the update method, when you edit and make the changes it does not redirect me to the path I want but it flags me the error: DoubleRenderError Render and / or redirect were called multiple times in this action.
Is there anything I'm doing wrong with the redirect? this is my controller's method:
def update
super
@user = User.find(user_params[:user][:id])
user_params[:user].delete :id
if user_params[:user][:password].blank?
user_params[:user].delete :password
user_params[:user].delete :password_confirmation
end
respond_to do |format|
if @user.update_attributes(user_params['user'])
format.html { redirect_to users_list_path, notice: 'Usuario modificado con éxito.' }
else
format.html { render :edit, notice: 'Error.' }
end
end
end