Changeset 3753
- Timestamp:
- 03/03/06 06:25:39 (4 years ago)
- Files:
-
- trunk/activerecord/CHANGELOG (modified) (1 diff)
- trunk/activerecord/lib/active_record/associations/has_one_association.rb (modified) (1 diff)
- trunk/activerecord/test/associations_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activerecord/CHANGELOG
r3734 r3753 1 1 *SVN* 2 3 * Fixed that calling HasOneProxy#build_model repeatedly would cause saving to happen #4058 [anna@wota.jp] 2 4 3 5 * Added Sybase database adapter that relies on the Sybase Open Client bindings (see http://raa.ruby-lang.org/project/sybase-ctlib) #3765 [John Sheets]. It's almost completely Active Record compliant, but has the following caveats: trunk/activerecord/lib/active_record/associations/has_one_association.rb
r3586 r3753 35 35 else 36 36 @target[@reflection.primary_key_name] = nil 37 @target.save unless @owner.new_record? 37 @target.save unless @owner.new_record? || @target.new_record? 38 38 end 39 39 end trunk/activerecord/test/associations_test.rb
r3452 r3753 157 157 assert !account.save 158 158 assert_equal "can't be empty", account.errors.on("credit_limit") 159 end 160 161 def test_build_association_twice_without_saving_affects_nothing 162 count_of_account = Account.count 163 firm = Firm.find(:first) 164 account1 = firm.build_account("credit_limit" => 1000) 165 account2 = firm.build_account("credit_limit" => 2000) 166 167 assert_equal count_of_account, Account.count 159 168 end 160 169