22 lines
673 B
Ruby
22 lines
673 B
Ruby
class HomeController < ApplicationController
|
|
def index
|
|
|
|
end
|
|
|
|
def seed
|
|
market = Market.where(name: 'BitBay').first
|
|
if market.blank?
|
|
market = Market.new(name: 'BitBay', url: 'https://bitbay.net')
|
|
market.save
|
|
end
|
|
bit_bay_currencies = [['BTC', 'Bitcoin'],['BCC', 'Bitcoin Cash'], ['ETH','Ethereum'], ['LSK', 'Lisk'], ['LTC', 'Litecoin'], ['DASH', 'Dash'], ['GAME', 'GameCredits']]
|
|
for bbc in bit_bay_currencies
|
|
curr = Currency.where('name = ?', bbc[0]).first
|
|
if curr.blank?
|
|
curr = Currency.new(name: bbc[0], description: bbc[1], market_id: market.id)
|
|
curr.save
|
|
end
|
|
end
|
|
end
|
|
end
|