mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Rename Adapter.get to Adapter.lookup
Per https://github.com/rails-api/active_model_serializers/pull/1017#discussion_r39003855
comment by sandstrom in discussion of the inherited hook
> I'm thinking that it would be better to register adapters manually, without using the hook, i.e.
> have people call ActiveModel::Serializer::Adapter.register directly (perhaps in an initializer).
> Possibly, some inspiration can be taken from how ActiveJob adapters are wired[1].
> [1] a11571cec3/activejob/lib/active_job/queue_adapter.rb (L52-L56)
This commit is contained in:
@@ -94,9 +94,9 @@ module ActiveModel
|
||||
end
|
||||
end
|
||||
|
||||
# @see ActiveModel::Serializer::Adapter.get
|
||||
# @see ActiveModel::Serializer::Adapter.lookup
|
||||
def self.adapter
|
||||
ActiveModel::Serializer::Adapter.get(config.adapter)
|
||||
ActiveModel::Serializer::Adapter.lookup(config.adapter)
|
||||
end
|
||||
|
||||
def self.root_name
|
||||
|
||||
Reference in New Issue
Block a user