File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
lib/active_model_serializers/adapter Expand file tree Collapse file tree 2 files changed +8
-0
lines changed File renamed without changes.
Original file line number Diff line number Diff line change @@ -55,6 +55,9 @@ def include_meta(json)
55
55
end
56
56
57
57
class << self
58
+ # Sets the default transform for the adapter.
59
+ #
60
+ # @return [Symbol] the default transform for the adapter
58
61
def default_transform
59
62
:unaltered
60
63
end
@@ -69,6 +72,11 @@ def transform(options)
69
72
ActiveModelSerializers . config . transform || default_transform
70
73
end
71
74
75
+ # Transforms the casing of the supplied value.
76
+ #
77
+ # @param value [Object] the value to be transformed
78
+ # @param options [Object] serializable resource options
79
+ # @return [Symbol] the default transform for the adapter
72
80
def transform_casing! ( value , options )
73
81
Transform . send ( transform ( options ) , value )
74
82
end
You can’t perform that action at this time.
0 commit comments