@@ -422,11 +422,13 @@ def inherited(subclass)
422
422
subclass . abstract ( false )
423
423
subclass . immutable ( false )
424
424
subclass . caching ( _caching )
425
+ subclass . cache_field ( _cache_field ) if @_cache_field
425
426
subclass . singleton ( singleton? , ( _singleton_options . dup || { } ) )
426
427
subclass . exclude_links ( _exclude_links )
427
- subclass . paginator ( _paginator )
428
+ subclass . paginator ( @ _paginator)
428
429
subclass . _attributes = ( _attributes || { } ) . dup
429
430
subclass . polymorphic ( false )
431
+ subclass . key_type ( @_resource_key_type )
430
432
431
433
subclass . _model_hints = ( _model_hints || { } ) . dup
432
434
@@ -755,7 +757,7 @@ def key_type(key_type)
755
757
end
756
758
757
759
def resource_key_type
758
- @_resource_key_type ||= JSONAPI . configuration . resource_key_type
760
+ @_resource_key_type || JSONAPI . configuration . resource_key_type
759
761
end
760
762
761
763
# override to all resolution of masked ids to actual ids. Because singleton routes do not specify the id this
@@ -878,7 +880,7 @@ def _default_primary_key
878
880
end
879
881
880
882
def _cache_field
881
- @_cache_field ||= JSONAPI . configuration . default_resource_cache_field
883
+ @_cache_field || JSONAPI . configuration . default_resource_cache_field
882
884
end
883
885
884
886
def _table_name
@@ -898,7 +900,7 @@ def _allowed_sort
898
900
end
899
901
900
902
def _paginator
901
- @_paginator ||= JSONAPI . configuration . default_paginator
903
+ @_paginator || JSONAPI . configuration . default_paginator
902
904
end
903
905
904
906
def paginator ( paginator )
0 commit comments