ActiveModel::Model handles the ActiveModel::Errors API

As pointed out in
https://github.com/rails-api/active_model_serializers/issues/2049

ActiveModel::Model already extends ActiveModel::Translation which
implements human_attribute_name and lookup_ancestors
This commit is contained in:
Benjamin Fleischer 2017-02-15 20:30:28 -06:00
parent a9d533d916
commit 006956e56b

View File

@ -125,16 +125,5 @@ module ActiveModelSerializers
"#{id}-#{updated_at.strftime('%Y%m%d%H%M%S%9N')}"
].compact)
end
# The following methods are needed to be minimally implemented for ActiveModel::Errors
# :nocov:
def self.human_attribute_name(attr, _options = {})
attr
end
def self.lookup_ancestors
[self]
end
# :nocov:
end
end