class ActiveModel::Serializer::ErrorsSerializer
Attributes
object[R]
root[R]
serializers[R]
Public Class Methods
new(resources, options = {})
click to toggle source
# File lib/active_model/serializer/errors_serializer.rb, line 12 def initialize(resources, options = {}) @root = options[:root] @object = resources @serializers = resources.map do |resource| serializer_class = options.fetch(:serializer) { ActiveModel::Serializer::ErrorSerializer } serializer_class.new(resource, options.except(:serializer)) end end
Public Instance Methods
json_key()
click to toggle source
# File lib/active_model/serializer/errors_serializer.rb, line 25 def json_key nil end
success?()
click to toggle source
# File lib/active_model/serializer/errors_serializer.rb, line 21 def success? false end