From 0af36c62a5710e023402e37b019ad9982e69de4b Mon Sep 17 00:00:00 2001 From: Sean Griffin Date: Tue, 23 Jan 2018 14:08:46 -0700 Subject: Allow attributes with a proc default to be marshalled We don't implement much custom marshalling logic for these objects, but the proc default case needs to be handled separately. Unfortunately there's no way to just say "do what you would have done but with this value for one ivar", so we have to manually implement `marshal_load` as well. The test case is a little bit funky, but I'd really like an equality test in there, and there's no easy way to add one now that this is out of AR (since the `attributes` method isn't here) Fixes #31216 --- activemodel/CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'activemodel/CHANGELOG.md') diff --git a/activemodel/CHANGELOG.md b/activemodel/CHANGELOG.md index b67a803b9d..86353674d9 100644 --- a/activemodel/CHANGELOG.md +++ b/activemodel/CHANGELOG.md @@ -1,7 +1,14 @@ +* Models using the attributes API with a proc default can now be marshalled. + + Fixes #31216. + + *Sean Griffin* + * Fix to working before/after validation callbacks on multiple contexts. *Yoshiyuki Hirano* + ## Rails 5.2.0.beta2 (November 28, 2017) ## * No changes. -- cgit v1.2.3 From 1c383df324fdf0b68b3f54a649eb7d2a4f55bcb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Tue, 30 Jan 2018 18:51:17 -0500 Subject: Start Rails 6.0 development!!! :tada::tada::tada: --- activemodel/CHANGELOG.md | 66 +----------------------------------------------- 1 file changed, 1 insertion(+), 65 deletions(-) (limited to 'activemodel/CHANGELOG.md') diff --git a/activemodel/CHANGELOG.md b/activemodel/CHANGELOG.md index 86353674d9..13ea7d0bf3 100644 --- a/activemodel/CHANGELOG.md +++ b/activemodel/CHANGELOG.md @@ -1,67 +1,3 @@ -* Models using the attributes API with a proc default can now be marshalled. - Fixes #31216. - *Sean Griffin* - -* Fix to working before/after validation callbacks on multiple contexts. - - *Yoshiyuki Hirano* - - -## Rails 5.2.0.beta2 (November 28, 2017) ## - -* No changes. - - -## Rails 5.2.0.beta1 (November 27, 2017) ## - -* Execute `ConfirmationValidator` validation when `_confirmation`'s value is `false`. - - *bogdanvlviv* - -* Allow passing a Proc or Symbol to length validator options. - - *Matt Rohrer* - -* Add method `#merge!` for `ActiveModel::Errors`. - - *Jahfer Husain* - -* Fix regression in numericality validator when comparing Decimal and Float input - values with more scale than the schema. - - *Bradley Priest* - -* Fix methods `#keys`, `#values` in `ActiveModel::Errors`. - - Change `#keys` to only return the keys that don't have empty messages. - - Change `#values` to only return the not empty values. - - Example: - - # Before - person = Person.new - person.errors.keys # => [] - person.errors.values # => [] - person.errors.messages # => {} - person.errors[:name] # => [] - person.errors.messages # => {:name => []} - person.errors.keys # => [:name] - person.errors.values # => [[]] - - # After - person = Person.new - person.errors.keys # => [] - person.errors.values # => [] - person.errors.messages # => {} - person.errors[:name] # => [] - person.errors.messages # => {:name => []} - person.errors.keys # => [] - person.errors.values # => [] - - *bogdanvlviv* - - -Please check [5-1-stable](https://github.com/rails/rails/blob/5-1-stable/activemodel/CHANGELOG.md) for previous changes. +Please check [5-2-stable](https://github.com/rails/rails/blob/5-2-stable/activemodel/CHANGELOG.md) for previous changes. -- cgit v1.2.3 From d4eb0dc89ee6b476e2e10869dc282a96f956c6c7 Mon Sep 17 00:00:00 2001 From: Jeremy Daer Date: Sat, 17 Feb 2018 13:02:18 -0800 Subject: Rails 6 requires Ruby 2.4.1+ Skipping over 2.4.0 to sidestep the `"symbol_from_string".to_sym.dup` bug. References #32028 --- activemodel/CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'activemodel/CHANGELOG.md') diff --git a/activemodel/CHANGELOG.md b/activemodel/CHANGELOG.md index 13ea7d0bf3..b28c83e4ed 100644 --- a/activemodel/CHANGELOG.md +++ b/activemodel/CHANGELOG.md @@ -1,3 +1,8 @@ +## Rails 6.0.0.alpha (Unreleased) ## + +* Rails 6 requires Ruby 2.4.1 or newer. + + *Jeremy Daer* Please check [5-2-stable](https://github.com/rails/rails/blob/5-2-stable/activemodel/CHANGELOG.md) for previous changes. -- cgit v1.2.3