The personal finance app for everyone
Remove currency conversion job call (#566)
Zach Gollwitzerd402f4d6bab3
diff --git a/app/controllers/settings_controller.rb b/app/controllers/settings_controller.rbindex 5751b952..be273f7b 100644--- a/app/controllers/settings_controller.rb+++ b/app/controllers/settings_controller.rb@@ -6,17 +6,12 @@ class SettingsController < ApplicationControllerdef updateuser_params_with_family = user_params- # Ensure we're only updating the family associated with the current user+if Current.familyfamily_attributes = user_params_with_family[:family_attributes].merge({ id: Current.family.id })user_params_with_family[:family_attributes] = family_attributesend- # If the family attribute for currency is changed, we need to convert all account balances to the new currency with the ConvertCurrencyJob job- if user_params_with_family[:family_attributes][:currency] != Current.family.currency- ConvertCurrencyJob.perform_later(Current.family)- end-if Current.user.update(user_params_with_family)redirect_to root_path, notice: "Profile updated successfully."else