Amount.to_fixture
, this record was generated:
amount_03246:
deleted_at:
id: 3246
value: !ruby/object:BigDecimal {}
currency: 203
classic to_yaml on Amount class works fine. So I think that problem was violated by merging hash or some other magic ;-) in to_fixture method
Solution is easy (similiar as BigDecimal and YAML don't get along): in ar_fixture.rb override BigDecimal.to_yaml method like this:
class BigDecimal
alias :_original_to_yaml :to_yaml
def to_yaml (opts={},&block)
to_s.to_yaml(opts,&block)
end
end
1 komentář:
Okomentovat