rails/rails — Issue #5346: ActiveRecord queries with arrays of classes are built incorrectly
Author: zenprogrammer
Created: 2012-03-09 02:26:35+00:00
State: open

I'm seeing the following behavior on 3.2.2 and ruby 1.9.3p125:

```
1.9.3p125 :003 > Account.where(:type => SavingsAccount)
Account Load (0.9ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."type" = 'SavingsAccount'
=> []
1.9.3p125 :004 > Account.where(:type => [SavingsAccount])
Account Load (0.6ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."type" IN ('--- !ruby/class ''SavingsAccount''
')
=> []
```

It looks like classes are not being converted to Strings properly when they are passed in Arrays.