From 3973b312a7473216ad6db2d7224168313d833fa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Pradel?= Date: Thu, 23 Aug 2018 15:50:35 -0700 Subject: [PATCH] Demodulize relationship record class name --- lib/fast_jsonapi/relationship.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fast_jsonapi/relationship.rb b/lib/fast_jsonapi/relationship.rb index 7924969..6acc0a3 100644 --- a/lib/fast_jsonapi/relationship.rb +++ b/lib/fast_jsonapi/relationship.rb @@ -68,7 +68,7 @@ module FastJsonapi def id_hash_from_record(record, record_types) # memoize the record type within the record_types dictionary, then assigning to record_type: - associated_record_type = record_types[record.class] ||= record.class.name.underscore.to_sym + associated_record_type = record_types[record.class] ||= record.class.name.demodulize.underscore.to_sym id_hash(record.id, associated_record_type) end