Commit Graph

4 Commits

Author SHA1 Message Date
Damien Mathieu
30a576fa14 fix querying with an empty hash
Closes #6960
2012-09-19 15:57:22 +02:00
Jon Leighton
eb4a623d74 Fix nested association references
Previously the reflection would be looked up on the wrong class. However
the test passed because the examples referred back to themselves.
2012-09-12 23:32:50 +01:00
beerlington
3da275c439 Accept belongs_to assoc. keys in ActiveRecord queries
Allows you to specify the model association key in a belongs_to
relationship instead of the foreign key.

The following queries are now equivalent:

Post.where(:author_id => Author.first)
Post.where(:author => Author.first)

PriceEstimate.where(:estimate_of_type => 'Treasure', :estimate_of_id => treasure)
PriceEstimate.where(:estimate_of => treasure)
2012-09-11 14:11:51 -04:00
Aaron Patterson
9340f89849 predicate builder should not recurse for determining where columns.
Thanks to Ben Murphy for reporting this

CVE-2012-2661
2012-05-30 15:09:13 -07:00