Sha256: 12c3130ba93c7f661f8ce42d1a023c7e41075a711fbac850e6687ac7c78ec5fd

Contents?: true

Size: 513 Bytes

Versions: 10

Compression:

Stored size: 513 Bytes

Contents

module Spree
  FrontendHelper.class_eval do

    # Returns the credit cards with payment method CieloCredit
    #
    # @author Isabella Santos
    #
    # @param payment_sources [Spree::CreditCard::ActiveRecord_AssociationRelation]
    #
    # @return [Array]
    #
    def has_cielo_credit payment_sources
      has_cielo_credit = []
      payment_sources.each { |card| has_cielo_credit << card.id if card.payment_method.is_a? Spree::PaymentMethod::CieloCredit }
      has_cielo_credit.to_json
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
spree_zaez_cielo-3.0.10 app/helpers/spree/frontend_helper_decorator.rb
spree_zaez_cielo-3.0.9 app/helpers/spree/frontend_helper_decorator.rb
spree_zaez_cielo-3.0.8 app/helpers/spree/frontend_helper_decorator.rb
spree_zaez_cielo-3.0.7 app/helpers/spree/frontend_helper_decorator.rb
spree_zaez_cielo-3.0.6 app/helpers/spree/frontend_helper_decorator.rb
spree_zaez_cielo-3.0.5 app/helpers/spree/frontend_helper_decorator.rb
spree_zaez_cielo-3.0.4 app/helpers/spree/frontend_helper_decorator.rb
spree_zaez_cielo-3.0.3 app/helpers/spree/frontend_helper_decorator.rb
spree_zaez_cielo-3.0.2 app/helpers/spree/frontend_helper_decorator.rb
spree_zaez_cielo-3.0.1 app/helpers/spree/frontend_helper_decorator.rb