From 56a3d5ec9183a9bcbf140d4102d45e3928f2617a Mon Sep 17 00:00:00 2001 From: Sean Griffin Date: Wed, 28 Jan 2015 09:36:42 -0700 Subject: Don't redefine autosave association callbacks in nested attrs These callbacks will already have been defined when the association was built. The check against `reflection.autosave` happens at call time, not at define time, so simply modifying the reflection is sufficient. Fixes #18704 --- activerecord/CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'activerecord/CHANGELOG.md') diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 22b1c8e95b..c0ebb892aa 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,10 @@ +* Don't define autosave association callbacks twice from + `accepts_nested_attributes_for`. + + Fixes #18704. + + *Sean Griffin* + * Integer types will no longer raise a `RangeError` when assigning an attribute, but will instead raise when going to the database. -- cgit v1.2.3