Sha256: 29c34306979af02df59e2da15e31316c225e6704c3c09eae85261c52ac72a736

Contents?: true

Size: 273 Bytes

Versions: 7

Compression:

Stored size: 273 Bytes

Contents

module SkipRequireCardNumbersConcern
  extend ActiveSupport::Concern
  included do
    prepend(InstanceMethods)
  end

  module InstanceMethods
    def require_card_numbers?
      super && !self.payment_method.kind_of?(Solidus::Gateway::BraintreeGateway)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
solidus_braintree-0.2.1 app/models/concerns/skip_require_card_numbers_concern.rb
solidus_braintree-0.2.0 app/models/concerns/skip_require_card_numbers_concern.rb
solidus_braintree-0.1.5 app/models/concerns/skip_require_card_numbers_concern.rb
solidus_braintree-0.1.3 app/models/concerns/skip_require_card_numbers_concern.rb
solidus_braintree-0.1.2 app/models/concerns/skip_require_card_numbers_concern.rb
solidus_braintree-0.1.1 app/models/concerns/skip_require_card_numbers_concern.rb
solidus_braintree-0.1.0 app/models/concerns/skip_require_card_numbers_concern.rb