aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-11-08 08:17:43 -0800
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-11-08 08:17:43 -0800
commitb02556708cd0c3de3d56bd94c624ade44cbce14a (patch)
tree78c85ad7d10d905c1b78b2bfbfb2614271c6f155 /activerecord/CHANGELOG.md
parente41d78ce221b2ca84cc260e20f3813eaace586b3 (diff)
parent58e48d5292242f000dc8a87fdbb1c0ccdcf286d8 (diff)
downloadrails-b02556708cd0c3de3d56bd94c624ade44cbce14a.tar.gz
rails-b02556708cd0c3de3d56bd94c624ade44cbce14a.tar.bz2
rails-b02556708cd0c3de3d56bd94c624ade44cbce14a.zip
Merge pull request #8138 from sobrinho/3-2-stable
Fix accepts_nested_attributes for child classes
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 3e071cfa01..ed14d1f6e6 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,5 +1,31 @@
## Rails 3.2.9 (unreleased)
+* Fix issue that raises `NameError` when overriding the `accepts_nested_attributes` in child classes.
+
+ Before:
+
+ class Shared::Person < ActiveRecord::Base
+ has_one :address
+
+ accepts_nested_attributes :address, :reject_if => :all_blank
+ end
+
+ class Person < Shared::Person
+ accepts_nested_attributes :address
+ end
+
+ Person
+ #=> NameError: method `address_attributes=' not defined in Person
+
+ After:
+
+ Person
+ #=> Person(id: integer, ...)
+
+ Fixes #8131.
+
+ *Gabriel Sobrinho, Ricardo Henrique*
+
* Fix issue with collection associations calling first(n)/last(n) and attempting
to set the inverse association when `:inverse_of` was used. Fixes #8087.