def create_payment(amount_in_cents)
self.coin_payments.create!(reason: 'sale', price: amount_in_cents, coin_type: :btc)
end
raises NoMethodError (undefined method `price' for nil:NilClass):
Because we havent imported currency conversions bundle exec rake cryptocoin_payable:process_prices
In dev env it's fine but not in test where datas are deleted on each run.
raises
NoMethodError (undefined method `price' for nil:NilClass):Because we havent imported currency conversions
bundle exec rake cryptocoin_payable:process_pricesIn dev env it's fine but not in test where datas are deleted on each run.
rails g cryptocoin_payable:installshould generate test/fixtures/cryptocoin_payable/currency_conversions.ymlbundle exec rake cryptocoin_payable:process_prices)