Class: Spree::CreditCards::Find
- Inherits:
-
BaseFinder
- Object
- BaseFinder
- Spree::CreditCards::Find
- Defined in:
- app/finders/spree/credit_cards/find.rb
Instance Attribute Summary
Attributes inherited from BaseFinder
Instance Method Summary collapse
Methods inherited from BaseFinder
Constructor Details
This class inherits a constructor from Spree::BaseFinder
Instance Method Details
#execute ⇒ Object
4 5 6 7 8 9 |
# File 'app/finders/spree/credit_cards/find.rb', line 4 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 |