File tree 1 file changed +4
-1
lines changed
lib/rocket_pants/controller
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,9 @@ def self.extract_pagination(collection)
62
62
end
63
63
64
64
def self . normalise_object ( object , options = { } )
65
+ # So we don't use the wrong options / modify them up the chain...
66
+ options = options . dup
67
+
65
68
# First, prepare the object for serialization.
66
69
object = normalise_to_serializer object , options
67
70
@@ -71,7 +74,7 @@ def self.normalise_object(object, options = {})
71
74
if each_serializer = suboptions . delete ( :each_serializer )
72
75
suboptions [ :serializer ] = each_serializer
73
76
end
74
- object . map { |o | normalise_object o , suboptions . dup }
77
+ object . map { |o | normalise_object o , suboptions }
75
78
elsif object . respond_to? ( :serializable_hash )
76
79
object . serializable_hash options
77
80
elsif object . respond_to? ( :as_json )
You can’t perform that action at this time.
0 commit comments