Sha256: d221b9c8cf7677852435d9d699b9f4ae2291ac150ed6629f05ffe0953f4000c1

Contents?: true

Size: 793 Bytes

Versions: 95

Compression:

Stored size: 793 Bytes

Contents

class PaymentIcon < FrozenRecord::Base
  self.base_path = File.expand_path('../../db/', __dir__)

  GROUPS = {
      credit_cards: 'Credit cards',
      cryptocurrencies: 'Digital currencies',
      bank_transfers: 'Bank transfers',
      wallets: 'Digital wallets',
      convenience_stores: 'Convenience Stores',
      other: 'Other'
    }

  def path
    "payment_icons/#{name}.svg"
  end

  def self.find_by_group(group)
    where(group: group)
  end

  def self.credit_cards
    where(group: 'credit_cards')
  end

  def self.cryptocurrencies
    where(group: 'cryptocurrencies')
  end

  def self.bank_transfers
    where(group: 'bank_transfers')
  end

  def self.wallets
    where(group: 'wallets')
  end

  def self.convenience_stores
    where(group: 'convenience_stores')
  end
end

Version data entries

95 entries across 95 versions & 1 rubygems

Version Path
payment_icons-1.7.49 app/models/payment_icon.rb
payment_icons-1.7.48 app/models/payment_icon.rb
payment_icons-1.7.47 app/models/payment_icon.rb
payment_icons-1.7.45 app/models/payment_icon.rb
payment_icons-1.7.44 app/models/payment_icon.rb
payment_icons-1.7.43 app/models/payment_icon.rb
payment_icons-1.7.42 app/models/payment_icon.rb
payment_icons-1.7.39 app/models/payment_icon.rb
payment_icons-1.7.38 app/models/payment_icon.rb
payment_icons-1.7.37 app/models/payment_icon.rb
payment_icons-1.7.36 app/models/payment_icon.rb
payment_icons-1.7.35 app/models/payment_icon.rb
payment_icons-1.7.34 app/models/payment_icon.rb
payment_icons-1.7.33 app/models/payment_icon.rb
payment_icons-1.7.32 app/models/payment_icon.rb
payment_icons-1.7.31 app/models/payment_icon.rb
payment_icons-1.7.30 app/models/payment_icon.rb
payment_icons-1.7.29 app/models/payment_icon.rb
payment_icons-1.7.28 app/models/payment_icon.rb
payment_icons-1.7.27 app/models/payment_icon.rb