mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Follow up to #1535
- The removed classes and modules were added back with deprecation warning and deprecation test were added for them. - One test was renamed because it contained `__`. - Some tests were refactored. - The ActiveModelSerializers::Deserialization module is now called Adapter instead of ActiveModelSerializers::Adapter. - The changelog was added for #1535
This commit is contained in:
committed by
Benjamin Fleischer
parent
79e6acbc4a
commit
dd94fe2163
@@ -18,6 +18,7 @@ require 'active_model/serializer/type'
|
||||
# reified when subclassed to decorate a resource.
|
||||
module ActiveModel
|
||||
class Serializer
|
||||
extend ActiveSupport::Autoload
|
||||
include Configuration
|
||||
include Associations
|
||||
include Attributes
|
||||
@@ -25,6 +26,7 @@ module ActiveModel
|
||||
include Links
|
||||
include Meta
|
||||
include Type
|
||||
autoload :Adapter
|
||||
|
||||
# @param resource [ActiveRecord::Base, ActiveModelSerializers::Model]
|
||||
# @return [ActiveModel::Serializer]
|
||||
@@ -46,7 +48,7 @@ module ActiveModel
|
||||
# @see ActiveModelSerializers::Adapter.lookup
|
||||
# Deprecated
|
||||
def self.adapter
|
||||
warn 'Calling adapter method in Serializer, please use the ActiveModelSerializers::configured_adapter'
|
||||
warn 'Calling adapter method in Serializer, please use the ActiveModelSerializers::Adapter.configured_adapter'
|
||||
ActiveModelSerializers::Adapter.lookup(config.adapter)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user