mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-23 06:16:50 +00:00
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:
parent
a9d533d916
commit
006956e56b
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user