Skip to content

Commit

Permalink
Only load active payment methods in the backend
Browse files Browse the repository at this point in the history
This was the original behaviour in Solidus < 2.1, but the active scope
got lost in solidusio#1540. Payment methods used to use the `available` filter
which was scoped to active payment methods only. The `available_to_admin`
scope isn't limited active payment methods, so we need to add it here.
  • Loading branch information
Luuk Veenis committed Apr 7, 2017
1 parent cada235 commit 21c2df9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/app/controllers/spree/admin/payments_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def object_params

def load_data
@amount = params[:amount] || load_order.total
@payment_methods = Spree::PaymentMethod.available_to_admin
@payment_methods = Spree::PaymentMethod.active.available_to_admin
if @payment && @payment.payment_method
@payment_method = @payment.payment_method
else
Expand Down

0 comments on commit 21c2df9

Please sign in to comment.