diff options
author | bogdanvlviv <bogdanvlviv@gmail.com> | 2018-08-12 15:38:47 +0300 |
---|---|---|
committer | bogdanvlviv <bogdanvlviv@gmail.com> | 2018-08-12 15:38:47 +0300 |
commit | 159dc60bee254d981fdd3958b5f1c7a415114f81 (patch) | |
tree | aa913a9631d09ca5b6e49e02fa6c40159d6ab719 /activemodel | |
parent | bddab1fc864078dd1247bd8c2dd9668e0ff25f26 (diff) | |
download | rails-159dc60bee254d981fdd3958b5f1c7a415114f81.tar.gz rails-159dc60bee254d981fdd3958b5f1c7a415114f81.tar.bz2 rails-159dc60bee254d981fdd3958b5f1c7a415114f81.zip |
Add changelog entry for #31503 [ci skip]
Related to #31503
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/CHANGELOG.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/activemodel/CHANGELOG.md b/activemodel/CHANGELOG.md index 8f80838a33..4bf96e11b0 100644 --- a/activemodel/CHANGELOG.md +++ b/activemodel/CHANGELOG.md @@ -1,3 +1,19 @@ +* Fix `ActiveModel::Serializers::JSON#as_json` method for timestamps. + + Before: + ``` + contact = Contact.new(created_at: Time.utc(2006, 8, 1)) + contact.as_json["created_at"] # => 2006-08-01 00:00:00 UTC + ``` + + After: + ``` + contact = Contact.new(created_at: Time.utc(2006, 8, 1)) + contact.as_json["created_at"] # => "2006-08-01T00:00:00.000Z" + ``` + + *Bogdan Gusiev* + * Allows configurable attribute name for `#has_secure_password`. This still defaults to an attribute named 'password', causing no breaking change. There is a new method `#authenticate_XXX` where XXX is the |