Class: PaymentIcon

Inherits:
FrozenRecord::Base
  • Object
show all
Defined in:
app/models/payment_icon.rb

Constant Summary collapse

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.bank_transfersObject



29
30
31
# File 'app/models/payment_icon.rb', line 29

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

.convenience_storesObject



37
38
39
# File 'app/models/payment_icon.rb', line 37

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

.credit_cardsObject



21
22
23
# File 'app/models/payment_icon.rb', line 21

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

.cryptocurrenciesObject



25
26
27
# File 'app/models/payment_icon.rb', line 25

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

.find_by_group(group) ⇒ Object



17
18
19
# File 'app/models/payment_icon.rb', line 17

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

.walletsObject



33
34
35
# File 'app/models/payment_icon.rb', line 33

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

Instance Method Details

#pathObject



13
14
15
# File 'app/models/payment_icon.rb', line 13

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