Class: Api::V6::BaseSerializer
- Inherits:
-
Object
- Object
- Api::V6::BaseSerializer
- Includes:
- JSONAPI::Serializer
- Defined in:
- app/serializers/api/v6/base_serializer.rb
Direct Known Subclasses
RestaurantPictureSerializer, RestaurantTagSerializer, ReviewSummarySerializer
Class Method Summary collapse
-
.record_cache_options(options, fieldset, include_list, params) ⇒ Object
Override the record_cache_options method to include I18n.locale in the cache key.
Class Method Details
.record_cache_options(options, fieldset, include_list, params) ⇒ Object
Override the record_cache_options method to include I18n.locale in the cache key
10 11 12 13 14 15 |
# File 'app/serializers/api/v6/base_serializer.rb', line 10 def self.(, fieldset, include_list, params) opts = .dup # Add the locale to the cache key opts[:namespace] += ":#{MyLocaleManager.normalize_locale}" super(opts, fieldset, include_list, params) end |