rails/activerecord/test
Philippe Huibonhoa 359adaedd9 Fixed where for polymorphic associations when passed an array containing different types.
When passing in an array of different types of objects to `where`, it would only take into account the class of the first object in the array.

    PriceEstimate.where(estimate_of: [Treasure.find(1), Car.find(2)])
	# => SELECT "price_estimates".* FROM "price_estimates"
         WHERE ("price_estimates"."estimate_of_type" = 'Treasure' AND "price_estimates"."estimate_of_id" IN (1, 2))

This is fixed to properly look for any records matching both type and id:

    PriceEstimate.where(estimate_of: [Treasure.find(1), Car.find(2)])
    # => SELECT "price_estimates".* FROM "price_estimates"
         WHERE (("price_estimates"."estimate_of_type" = 'Treasure' AND "price_estimates"."estimate_of_id" = 1)
         OR ("price_estimates"."estimate_of_type" = 'Car' AND "price_estimates"."estimate_of_id" = 2))
2016-02-16 10:41:26 -08:00
..
active_record/connection_adapters introduce conn.data_source_exists? and conn.data_sources. 2015-09-22 19:48:44 +02:00
assets
cases Fixed where for polymorphic associations when passed an array containing different types. 2016-02-16 10:41:26 -08:00
fixtures Fixed where for polymorphic associations when passed an array containing different types. 2016-02-16 10:41:26 -08:00
migrations Internal test migrations use the private 'Current' version 2015-12-15 17:18:09 +10:30
models Fixed where for polymorphic associations when passed an array containing different types. 2016-02-16 10:41:26 -08:00
schema Use t.index in create_table instead of add_index in test schema 2016-01-31 17:36:04 +09:00
support Deprecate #table_exists?, #tables and passing arguments to #talbes 2015-11-09 23:13:23 +09:00
.gitignore
config.example.yml Remove legacy mysql adapter 2015-12-17 15:54:57 +00:00
config.rb