Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
Fix configurations controller to correctly display errors on update
Browse files Browse the repository at this point in the history
  • Loading branch information
Flavio Auciello committed Sep 27, 2019
1 parent a384d55 commit c41d69f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ def update
authorize! :update, SolidusPaypalBraintree::Configuration

params = configurations_params[:configuration_fields]
if SolidusPaypalBraintree::Configuration.update(params.keys, params.values)
results = SolidusPaypalBraintree::Configuration.update(params.keys, params.values)
if results.all? { |r| r.valid? }
flash[:success] = t('update_success', scope: 'solidus_paypal_braintree.configurations')
else
flash[:error] = t('update_error', scope: 'solidus_paypal_braintree.configurations')
Expand Down

0 comments on commit c41d69f

Please sign in to comment.