Class: RESTFramework::NativeModelSerializer

Inherits:
NativeSerializer show all
Defined in:
lib/rest_framework/serializers.rb

Overview

:nocov: Alias NativeModelSerializer -> NativeSerializer.

Instance Attribute Summary

Attributes inherited from BaseSerializer

#object

Instance Method Summary collapse

Methods inherited from NativeSerializer

[], #[], []=, #[]=, #_get_raw_serializer_config, #_serialize, #filter_except, filter_subcfg, #get_action, #get_controller_native_serializer_config, #get_local_native_serializer_config, #get_serializer_config, #serialize

Methods inherited from BaseSerializer

#associations, cache_enabled?, fragment_cache_enabled?, #serializable_hash, #serialize

Constructor Details

#initialize(**kwargs) ⇒ NativeModelSerializer

Returns a new instance of NativeModelSerializer.



288
289
290
291
292
293
294
295
296
# File 'lib/rest_framework/serializers.rb', line 288

def initialize(**kwargs)
  super
  ActiveSupport::Deprecation.warn(
    <<~MSG.split("\n").join(" "),
      RESTFramework::NativeModelSerializer is deprecated and will be removed in future versions of
      REST Framework; you should use RESTFramework::NativeSerializer instead.
    MSG
  )
end