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:
Benjamin Fleischer
2015-09-08 22:57:53 -05:00
parent af99c0d9e6
commit 363345b8dd
4 changed files with 23 additions and 23 deletions

View File

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