File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ class Configuration
17
17
:default_paginator ,
18
18
:default_page_size ,
19
19
:maximum_page_size ,
20
- :resource_finder ,
20
+ :default_resource_finder ,
21
21
:default_processor_klass ,
22
22
:use_text_errors ,
23
23
:top_level_links_include_pagination ,
@@ -109,7 +109,7 @@ def initialize
109
109
# The default ResourceFinder is the ActiveRelationResourceFinder which provides
110
110
# access to ActiveRelation backed models. Custom ResourceFinders can be specified
111
111
# in order to support other ORMs.
112
- self . resource_finder = JSONAPI ::ActiveRelationResourceFinder
112
+ self . default_resource_finder = JSONAPI ::ActiveRelationResourceFinder
113
113
114
114
# The default Operation Processor to use if one is not defined specifically
115
115
# for a Resource.
@@ -225,8 +225,8 @@ def default_processor_klass=(default_processor_klass)
225
225
@default_processor_klass = default_processor_klass
226
226
end
227
227
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
230
230
end
231
231
232
232
def allow_include = ( allow_include )
Original file line number Diff line number Diff line change @@ -423,7 +423,7 @@ def inherited(subclass)
423
423
424
424
check_reserved_resource_name ( subclass . _type , subclass . name )
425
425
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
427
427
end
428
428
429
429
# 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 = {})
1557
1557
end
1558
1558
end
1559
1559
1560
- JSONAPI . configuration . resource_finder = BreedResourceFinder
1560
+ JSONAPI . configuration . default_resource_finder = BreedResourceFinder
1561
1561
class BreedResource < JSONAPI ::Resource
1562
1562
attribute :name , format : :title
1563
1563
@@ -1569,7 +1569,7 @@ def _save
1569
1569
return :accepted
1570
1570
end
1571
1571
end
1572
- JSONAPI . configuration . resource_finder = JSONAPI ::ActiveRelationResourceFinder
1572
+ JSONAPI . configuration . default_resource_finder = JSONAPI ::ActiveRelationResourceFinder
1573
1573
1574
1574
class PlanetResource < JSONAPI ::Resource
1575
1575
attribute :name
You can’t perform that action at this time.
0 commit comments