Skip to content

Commit 6affb5e

Browse files
committed
Update documentation
1 parent cfcd16e commit 6affb5e

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed
File renamed without changes.

lib/active_model_serializers/adapter/base.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ def include_meta(json)
5555
end
5656

5757
class << self
58+
# Sets the default transform for the adapter.
59+
#
60+
# @return [Symbol] the default transform for the adapter
5861
def default_transform
5962
:unaltered
6063
end
@@ -69,6 +72,11 @@ def transform(options)
6972
ActiveModelSerializers.config.transform || default_transform
7073
end
7174

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
7280
def transform_casing!(value, options)
7381
Transform.send(transform(options), value)
7482
end

0 commit comments

Comments
 (0)