Class: FlatMapArraySerializer

Inherits:
ActiveModel::ArraySerializer
  • Object
show all
Defined in:
app/serializers/flat_map_array_serializer.rb

Instance Method Summary collapse

Instance Method Details

#serializable_object(options = {}) ⇒ Object


4
5
6
7
8
9
10
# File 'app/serializers/flat_map_array_serializer.rb', line 4

def serializable_object(options={})
  @object.flat_map do |subarray|
    subarray.map do |item|
      serializer_for(item).serializable_object_with_notification(options)
    end
  end
end