File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ class ArrayResource < Base
13
13
14
14
class << self
15
15
def model_class
16
- @@model_class ||= Object . const_set (
16
+ @@model_class ||= Avo . const_set (
17
17
class_name ,
18
18
Class . new do
19
19
include ActiveModel ::Model
@@ -68,7 +68,7 @@ def fetch_records(array_of_records = nil)
68
68
# Dynamically create a class with accessors for all unique keys from the records
69
69
keys = array_of_records . flat_map ( &:keys ) . uniq
70
70
71
- Object . const_set (
71
+ Avo . const_set (
72
72
class_name ,
73
73
Class . new do
74
74
include ActiveModel ::Model
@@ -82,7 +82,7 @@ def fetch_records(array_of_records = nil)
82
82
end
83
83
)
84
84
85
- custom_class = class_name . constantize
85
+ custom_class = "Avo:: #{ class_name } " . constantize
86
86
87
87
# Map the records to instances of the dynamically created class
88
88
array_of_records . map do |item |
You can’t perform that action at this time.
0 commit comments