From 8795ac52978464805f4759f2769bafca1c02c9ff Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Tue, 29 May 2012 00:19:39 -0300 Subject: [PATCH] Add note about CollectionAssociation#delete change to upgrading guide [ci skip] --- guides/source/upgrading_ruby_on_rails.textile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/guides/source/upgrading_ruby_on_rails.textile b/guides/source/upgrading_ruby_on_rails.textile index dcfd252defced..63011d263ddf4 100644 --- a/guides/source/upgrading_ruby_on_rails.textile +++ b/guides/source/upgrading_ruby_on_rails.textile @@ -38,6 +38,10 @@ h4(#identity_map4_0). IdentityMap Rails 4.0 has removed IdentityMap from ActiveRecord, due to "some inconsistencies with associations":https://github.com/rails/rails/commit/302c912bf6bcd0fa200d964ec2dc4a44abe328a6. If you have manually enabled it in your application, you will have to remove the following config that has no effect anymore: config.active_record.identity_map. +h4(#active_record4_0). ActiveRecord + +The delete method in collection associations can now receive Fixnum or String arguments as record ids, besides ActiveRecord objects, pretty much like the destroy method does. Previously it raised ActiveRecord::AssociationTypeMismatch for such arguments, from Rails 4.0 on it'll automatically try to find the records matching the given record ids before deleting them. + h4(#active_model4_0). ActiveModel Rails 4.0 has changed how errors attach with the ConfirmationValidator. Now when confirmation validations fail the error will be attached to :#{attribute}_confirmation instead of attribute.