Class: RESTFramework::NativeModelSerializer

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

Overview

:nocov: Alias NativeModelSerializer -> NativeSerializer.

Instance Method Summary collapse

Methods inherited from NativeSerializer

#[], [], #[]=, []=, #get_action, #get_controller_native_serializer_config, #get_local_native_serializer_config, #get_serializer_config, #serialize

Methods inherited from BaseSerializer

#serialize

Constructor Details

#initialize(**kwargs) ⇒ NativeModelSerializer

Returns a new instance of NativeModelSerializer.



153
154
155
156
157
158
159
160
161
# File 'lib/rest_framework/serializers.rb', line 153

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