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?
Other question :
In my database, I have a table "line_items" with attributes :
- id -> integer
- product_id -> integer
and I have a foreign key (product-id references table product)
It is possible to recover the class of attribute product_id?
In my app I list object in my database (like phpMyAdmin) and if a
foreign key I want to link to the object reference by this foreign key.
For example, in "line_items", list object of this table and I want a
link in "product_id" to this product