Constructs not proper sql on insert #2

Closed
strikeroff opened this Issue Sep 29, 2011 · 1 comment

Projects

None yet

2 participants

@strikeroff

Fails on type cast. Whin trying to save model Orders it fails:

Order.create :list => [1,2,3,4]

Constructed sql:

INSERT INTO "orders" ("list",  "created_at", "updated_at") VALUES (--- 
- 18
- 18
- 21
- 44
,  '2011-09-29 14:11:31.480726', '2011-09-29 14:11:31.480726') RETURNING "id"

Migration is as follows

    t.decimal_array :list

Error was

PGError: ERROR:  column "list" is of type numeric[] but expression is of type integer
LINE 2: - 18
@tlconnor
Owner
tlconnor commented Feb 7, 2012

Fixed by pull request #5

@tlconnor tlconnor closed this Feb 7, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment