Changeset 7133
- Timestamp:
- 06/27/07 02:56:11 (1 year ago)
- Files:
-
- trunk/activerecord/CHANGELOG (modified) (1 diff)
- trunk/activerecord/lib/active_record/base.rb (modified) (1 diff)
- trunk/activerecord/test/finder_test.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activerecord/CHANGELOG
r7119 r7133 1 1 *SVN* 2 3 * Array attribute conditions work with proxied association collections. #8318 [kamal, theamazingrando] 2 4 3 5 * Fix polymorphic has_one associations declared in an abstract class. #8638 [lifofifo, daxhuiberts] trunk/activerecord/lib/active_record/base.rb
r7107 r7133 1288 1288 case argument 1289 1289 when nil then "IS ?" 1290 when Array then "IN (?)"1290 when Array, ActiveRecord::Associations::AssociationCollection then "IN (?)" 1291 1291 when Range then "BETWEEN ? AND ?" 1292 1292 else "= ?" trunk/activerecord/test/finder_test.rb
r6998 r7133 9 9 10 10 class FinderTest < Test::Unit::TestCase 11 fixtures :companies, :topics, :entrants, :developers, :developers_projects, :posts, :comments, :accounts 11 fixtures :companies, :topics, :entrants, :developers, :developers_projects, :posts, :comments, :accounts, :authors 12 12 13 13 def test_find … … 158 158 assert Topic.find(1, :conditions => { :approved => false }) 159 159 assert_raises(ActiveRecord::RecordNotFound) { Topic.find(1, :conditions => { :approved => true }) } 160 end 161 162 def test_find_on_association_proxy_conditions 163 assert_equal [1, 2, 3, 5, 6, 7, 8, 9, 10], Comment.find_all_by_post_id(authors(:david).posts).map(&:id).sort 160 164 end 161 165