@@ -51,11 +51,11 @@ def self.digest_caller_file(caller_line)
51
51
class_attribute :_attributes_keys # @api private : maps attribute value to explict key name, @see Serializer#attribute
52
52
self . _attributes_keys ||= { }
53
53
serializer . class_attribute :_cache # @api private : the cache object
54
- serializer . class_attribute :_fragmented # @api private :
54
+ serializer . class_attribute :_fragmented # @api private : @see ::fragmented
55
55
serializer . class_attribute :_cache_key # @api private : when present, is first item in cache_key
56
56
serializer . class_attribute :_cache_only # @api private : when fragment caching, whitelists cached_attributes. Cannot combine with except
57
57
serializer . class_attribute :_cache_except # @api private : when fragment caching, blacklists cached_attributes. Cannot combine with only
58
- serializer . class_attribute :_cache_options # @api private : Used by CachedSerializer, passed to _cache.fetch
58
+ serializer . class_attribute :_cache_options # @api private : used by CachedSerializer, passed to _cache.fetch
59
59
# _cache_options include:
60
60
# expires_in
61
61
# compress
@@ -153,11 +153,11 @@ def self.cache(options = {})
153
153
154
154
# @param resource [ActiveRecord::Base, ActiveModelSerializers::Model]
155
155
# @return [ActiveModel::Serializer]
156
- # Preferentially retuns
156
+ # Preferentially returns
157
157
# 1. resource.serializer
158
- # 2. ArraySerializer for a collection
158
+ # 2. ArraySerializer when resource is a collection
159
159
# 3. options[:serializer]
160
- # 4. lookup serializer by class (i.e. resource is a class)
160
+ # 4. lookup serializer when resource is a Class
161
161
def self . serializer_for ( resource , options = { } )
162
162
if resource . respond_to? ( :serializer_class )
163
163
resource . serializer_class
0 commit comments