Sha256: 4d8daec5bfc167448e2ba1956ccc86123ba7353d663bd888b97e3df269e07661
Contents?: true
Size: 469 Bytes
Versions: 3
Compression:
Stored size: 469 Bytes
Contents
Spree::PaymentMethod.class_eval do has_many :store_payment_methods has_many :stores, :through => :store_payment_methods def self.available(display_on = 'both', store = nil) result = all.select do |p| p.active && (p.environment == Rails.env || p.environment.blank?) && (store.nil? || store.payment_methods.empty? || store.payment_methods.include?(p)) && (p.display_on == display_on.to_s || p.display_on.blank?) end end end
Version data entries
3 entries across 3 versions & 1 rubygems