# Field types of a rails model

**URL:** <https://www.ruby-forum.com/t/field-types-of-a-rails-model/106112>\
**Category:** Rails\
**Created:** [June 6, 2007, 3:36pm UTC](https://www.ruby-forum.com/t/field-types-of-a-rails-model/106112 "2007-06-06T15:36:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![halfgaar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/ea666f/32.png) [@halfgaar](https://www.ruby-forum.com/u/halfgaar)\
**Post date:** [June 6, 2007, 3:36pm UTC](https://www.ruby-forum.com/t/field-types-of-a-rails-model/106112/1 "2007-06-06T15:36:20Z")

</div>

Hi,

I don’t understand something about the types of the fields/attributes  
of rails models.

In one of my models, InvestmentAdmittanceTransaction, I have a field  
called client\_new\_participations. It’s a numeric value (I validate it  
with validates\_numericality\_of, and it’s a numeric value in  
postgresql). In the validate method of the model, the attribute is a  
string.

In another model, InvestmentProcurementTransaction, I have a field  
called fund\_cash\_payment. It’s identical to the above one in type,  
i.e. a numeric. But, when using it in the validate method, it’s a  
BigDecimal.

Why are those fields different types in each model, even though the  
situation is exactly the same?
