class ArSync::CollectionWithOrder
Public Class Methods
new(records, order:, limit:)
click to toggle source
# File lib/ar_sync/collection.rb, line 49 def initialize(records, order:, limit:) @records = records @order = { mode: order, limit: limit } end
Public Instance Methods
ar_serializer_build_sub_calls()
click to toggle source
# File lib/ar_sync/collection.rb, line 54 def ar_serializer_build_sub_calls values = @records.map { {} } [{ order: @order, collection: values }, @records.zip(values)] end