mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Remove Adapter autoloads in favor of require
Adapters must be eager loaded to ensure they are defined
before they are used as namespacing.
cf6a074a1c (diff-41f2b3509d33e1c65bb70ee0ec7a2eea)
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
class ActiveModel::Serializer::Adapter::JsonApi < ActiveModel::Serializer::Adapter
|
||||
module ActiveModel
|
||||
class Serializer
|
||||
class Adapter
|
||||
class JsonApi < Adapter
|
||||
extend ActiveSupport::Autoload
|
||||
autoload :PaginationLinks
|
||||
autoload :FragmentCache
|
||||
@@ -157,4 +160,7 @@ class ActiveModel::Serializer::Adapter::JsonApi < ActiveModel::Serializer::Adapt
|
||||
def links_for(serializer, options)
|
||||
JsonApi::PaginationLinks.new(serializer.object, options[:context]).serializable_hash(options)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user