Sha256: a89ac1229cfbc2907157970cfb07acbf4266766fe78c028c2c4a1efa1cda2c12

Contents?: true

Size: 208 Bytes

Versions: 3

Compression:

Stored size: 208 Bytes

Contents

class ActiveModel::Serializer::ErrorSerializer < ActiveModel::Serializer
  # @return [Hash<field_name,Array<error_message>>]
  def as_json
    object.errors.messages
  end

  def success?
    false
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
active_model_serializers-0.10.1 lib/active_model/serializer/error_serializer.rb
active_model_serializers-0.10.0 lib/active_model/serializer/error_serializer.rb
active_model_serializers-0.10.0.rc5 lib/active_model/serializer/error_serializer.rb