mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-23 06:16:50 +00:00
- Separate collection errors from resource errors in adapter - Refactor to ErrorsSerializer; first-class json error methods - DOCS - Rails 4.0 requires assert exact exception class, boo
7 lines
176 B
Ruby
7 lines
176 B
Ruby
class ActiveModel::Serializer::ErrorSerializer < ActiveModel::Serializer
|
|
# @return [Hash<field_name,Array<error_message>>]
|
|
def as_json
|
|
object.errors.messages
|
|
end
|
|
end
|