Richard Vincent wrote:
In my database, I have a table "products" with attributes :
- title ->string
- desc -> text
I use active record, but I don't know why recover the type of this
attribute with active record?
I try attributes_before_type_cast but I don't see the type
Can you help me?
Excuse for my english (I'am a young student french)
Either of these should get you what you want.
Although, I should mention that in nearly two years of developing in Rails professionally, I don't think I've ever needed to retrieve this information in any of my apps. Are you sure that what you really want isn't the ruby class of the value (eg. @instance.column_name.class ), or something else?