core/app/finders/spree/credit_cards/find.rb

Summary

Maintainability
A
0 mins
Test Coverage
F
0%
module Spree
  module CreditCards
    class Find < ::Spree::BaseFinder
      def execute
        return scope.default.take if params[:id].eql?('default')
        return scope.where(payment_method_id: params[:filter]['payment_method_id']) if params[:filter].present?

        scope
      end
    end
  end
end