Class: Spree::CreditCards::Find
- Inherits:
-
Object
- Object
- Spree::CreditCards::Find
- Defined in:
- app/finders/spree/credit_cards/find.rb
Instance Method Summary collapse
Instance Method Details
#execute(scope:, params:) ⇒ Object
4 5 6 7 8 9 |
# File 'app/finders/spree/credit_cards/find.rb', line 4 def execute(scope:, params:) 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 |