File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ class Configuration
1717 :default_paginator ,
1818 :default_page_size ,
1919 :maximum_page_size ,
20- :resource_finder ,
20+ :default_resource_finder ,
2121 :default_processor_klass ,
2222 :use_text_errors ,
2323 :top_level_links_include_pagination ,
@@ -109,7 +109,7 @@ def initialize
109109 # The default ResourceFinder is the ActiveRelationResourceFinder which provides
110110 # access to ActiveRelation backed models. Custom ResourceFinders can be specified
111111 # in order to support other ORMs.
112- self . resource_finder = JSONAPI ::ActiveRelationResourceFinder
112+ self . default_resource_finder = JSONAPI ::ActiveRelationResourceFinder
113113
114114 # The default Operation Processor to use if one is not defined specifically
115115 # for a Resource.
@@ -225,8 +225,8 @@ def default_processor_klass=(default_processor_klass)
225225 @default_processor_klass = default_processor_klass
226226 end
227227
228- def resource_finder = ( resource_finder )
229- @resource_finder = resource_finder
228+ def default_resource_finder = ( default_resource_finder )
229+ @default_resource_finder = default_resource_finder
230230 end
231231
232232 def allow_include = ( allow_include )
Original file line number Diff line number Diff line change @@ -423,7 +423,7 @@ def inherited(subclass)
423423
424424 check_reserved_resource_name ( subclass . _type , subclass . name )
425425
426- subclass . include JSONAPI . configuration . resource_finder if JSONAPI . configuration . resource_finder
426+ subclass . include JSONAPI . configuration . default_resource_finder if JSONAPI . configuration . default_resource_finder
427427 end
428428
429429 # A ResourceFinder is a mixin that adds functionality to find Resources and Resource Fragments
Original file line number Diff line number Diff line change @@ -1557,7 +1557,7 @@ def find_breeds_by_keys(keys, options = {})
15571557 end
15581558end
15591559
1560- JSONAPI . configuration . resource_finder = BreedResourceFinder
1560+ JSONAPI . configuration . default_resource_finder = BreedResourceFinder
15611561class BreedResource < JSONAPI ::Resource
15621562 attribute :name , format : :title
15631563
@@ -1569,7 +1569,7 @@ def _save
15691569 return :accepted
15701570 end
15711571end
1572- JSONAPI . configuration . resource_finder = JSONAPI ::ActiveRelationResourceFinder
1572+ JSONAPI . configuration . default_resource_finder = JSONAPI ::ActiveRelationResourceFinder
15731573
15741574class PlanetResource < JSONAPI ::Resource
15751575 attribute :name
You can’t perform that action at this time.
0 commit comments