fix(ObjectSerializer): pass to_json arguments (#80)

* fix(ObjectSerializer): pass to_json arguments

to_json takes arguments that serialized_json did not define.  This breaks a lot of things.

* Update CHANGELOG.md with latest fix and release
This commit is contained in:
Kevin Pheasey 2020-05-01 09:02:03 -04:00 committed by GitHub
parent c533634293
commit b64a0ceeed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

View File

@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.7.1] - 2020-05-01
### Fixed
- ObjectSerializer#serialized_json accepts arguments for to_json (#80)
## [1.7.0] - 2020-04-29
### Added
- Serializer option support for procs (#32)

View File

@ -72,12 +72,12 @@ module FastJsonapi
serializable_hash
end
def serialized_json
def serialized_json(*args)
warn(
'DEPRECATION: `#serialized_json` will be removed in the next release. '\
'More details: https://github.com/fast-jsonapi/fast_jsonapi/pull/44'
)
serializable_hash.to_json
serializable_hash.to_json(*args)
end
alias to_json serialized_json

View File

@ -1,3 +1,3 @@
module FastJsonapi
VERSION = '1.7.0'.freeze
VERSION = '1.7.1'.freeze
end