diff options
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/CHANGELOG.md | 8 | ||||
-rw-r--r-- | activerecord/lib/active_record/base.rb | 7 |
2 files changed, 11 insertions, 4 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 8dab1f3db0..4c81698517 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,4 +1,4 @@ -## Rails 3.2.4 (unreleased) ## +## Rails 3.2.4 (May 31, 2012) ## * Perf fix: Don't load the records when doing assoc.delete_all. GH #6289. *Jon Leighton* @@ -7,6 +7,12 @@ This could cause infinite recursion and potentially other problems. See GH #5667. *Jon Leighton* +* Datetime attributes are forced to be changed. GH #3965 + +* Fix attribute casting. GH #5549 + +* Fix #5667. Preloading should ignore scoping. + ## Rails 3.2.3 (March 30, 2012) ## * Added find_or_create_by_{attribute}! dynamic method. *Andrew White* diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 8c8717b759..9746efc7d1 100644 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -450,12 +450,12 @@ module ActiveRecord #:nodoc: private def relation #:nodoc: - relation ||= Relation.new(self, arel_table) + @relation ||= Relation.new(self, arel_table) if finder_needs_type_condition? - relation.where(type_condition).create_with(inheritance_column.to_sym => sti_name) + @relation.where(type_condition).create_with(inheritance_column.to_sym => sti_name) else - relation + @relation end end end @@ -489,6 +489,7 @@ module ActiveRecord #:nodoc: @marked_for_destruction = false @previously_changed = {} @changed_attributes = {} + @relation = nil ensure_proper_type |