Active_record postgresql adapter problem

Instead of using numeric I created the field “unit_price” as PostgreSQL
type money. Now when I try and add a row I get the following. How do I
override AR default behaviour to cast numeric post data to money, or am
I forced to only support database types that active_record knows about?

RuntimeError: ERROR C42804 Mcolumn “unit_price” is of type money but
expression is of type numeric HYou will need to rewrite or cast the
expression. Fparse_target.c L361 RupdateTargetListEntry: INSERT INTO
line_items (“order_id”, “product_id”, “quantity”, “unit_price”)
VALUES(1, 3, 1.0, 5367829.95)

Regards,
Jim

Jeremy K. wrote:

On Mar 1, 2006, at 9:19 AM, James B. wrote:

MONEY is deprecated. You work with it as a string, not a number.

Use NUMERIC instead.

Best,
jeremy

Done, Works, Thanks.

Jim

On Mar 1, 2006, at 9:19 AM, James B. wrote:

expression is of type numeric HYou will need to rewrite or cast the
expression. Fparse_target.c L361 RupdateTargetListEntry: INSERT INTO
line_items (“order_id”, “product_id”, “quantity”, “unit_price”)
VALUES(1, 3, 1.0, 5367829.95)

MONEY is deprecated. You work with it as a string, not a number.

Use NUMERIC instead.

Best,
jeremy