From 98bd3940c56d4354724fc8ba39be80e2c7e5d56f Mon Sep 17 00:00:00 2001 From: Moncef Belyamani Date: Tue, 19 Jun 2018 10:04:24 -0400 Subject: [PATCH] Fix presenter in Users::PhonesController#update **Why**: The presenter argument expects an otp_delivery_preference, not a User object. --- app/controllers/users/phones_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/users/phones_controller.rb b/app/controllers/users/phones_controller.rb index 5db18b67791..32045dd9a28 100644 --- a/app/controllers/users/phones_controller.rb +++ b/app/controllers/users/phones_controller.rb @@ -11,7 +11,7 @@ def edit def update @user_phone_form = UserPhoneForm.new(current_user) - @presenter = PhoneSetupPresenter.new(current_user) + @presenter = PhoneSetupPresenter.new(current_user.otp_delivery_preference) if @user_phone_form.submit(user_params).success? process_updates bypass_sign_in current_user