rails/rails — pull request #5352 by avakhov (2012-03-09 11:33:02+00:00)
Title: In AR depths use &:to_i before :uniq to process mixed arrays likes ["1", 1] correct

Without fix my new test failed:

```
1) Failure:
test_finding_using_sql_take_into_account_only_uniq_ids(HasManyAssociationsTest) [test/cases/associations/has_many_associations_test.rb:385]:
--- expected
+++ actual
@@ -1 +1 @@
-#
+[#]
```

This only one case then logic in condition [collection_association.rb#L549-555](https://github.com/rails/rails/blob/master/activerecord/lib/active_record/associations/collection_association.rb#L549-555) works not good. In other cases the method returned right results:

``` ruby
firm.clients_using_sql.find(1, "1", 2) # => [Client1, Client2] # <- that's correct
```