Skip to content

Commit 95c136f

Browse files
iamveryshishirmk
authored andcommitted
Add #to_hash conversion protocol to object serializer
1 parent 08cee7b commit 95c136f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/fast_jsonapi/object_serializer.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def serializable_hash
4242

4343
hash_for_one_record
4444
end
45+
alias_method :to_hash, :serializable_hash
4546

4647
def hash_for_one_record
4748
serializable_hash = { data: nil }

0 commit comments

Comments
 (0)