Sha256: 5cb5fbab48e017fa418098ceac70b52341f58a7fb29855716f501baa0b31b38d

Contents?: true

Size: 275 Bytes

Versions: 5

Compression:

Stored size: 275 Bytes

Contents

module Encore
  module Serializer
    module MainResourceManager
      extend ActiveSupport::Concern

      def self.add(collection, serializer)
        {
          serializer.root_key => collection.map { |o| serializer.new(o).as_json }
        }
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
encore-0.2.3 lib/encore/serializer/main_resource_manager.rb
encore-0.2.2 lib/encore/serializer/main_resource_manager.rb
encore-0.2.1 lib/encore/serializer/main_resource_manager.rb
encore-0.2 lib/encore/serializer/main_resource_manager.rb
encore-0.1 lib/encore/serializer/main_resource_manager.rb