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:
Yohan Robert
2016-02-28 13:38:15 +01:00
committed by Benjamin Fleischer
parent 79e6acbc4a
commit dd94fe2163
24 changed files with 831 additions and 622 deletions

View File

@@ -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