I fixed the issue after a number of hours. Hopefully this helps someone out there. Seems Devise changed its documentation. Anyway I removed this line:
account_update_params = devise_parameter_sanitizer.for(:account_update)
and changed this line:
if @user.update_with_password(account_update_params)
to
if @user.update_with_password(devise_parameter_sanitizer.sanitize(:account_update))
Everything works..now I need a drink.