Skip to content

Commit 3973b31

Browse files
sirdharmashishirmk
authored andcommitted
Demodulize relationship record class name
1 parent 42d9203 commit 3973b31

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/fast_jsonapi/relationship.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def ids_hash_from_record_and_relationship(record, params = {})
6868

6969
def id_hash_from_record(record, record_types)
7070
# memoize the record type within the record_types dictionary, then assigning to record_type:
71-
associated_record_type = record_types[record.class] ||= record.class.name.underscore.to_sym
71+
associated_record_type = record_types[record.class] ||= record.class.name.demodulize.underscore.to_sym
7272
id_hash(record.id, associated_record_type)
7373
end
7474

0 commit comments

Comments
 (0)