class ActiveModel::Serializer::ErrorSerializer < ActiveModel::Serializer # @return [Hash>] def as_json object.errors.messages end def success? false end end