Sha256: 43a0d2ea586be63879a74bd51cd0e5a49770fdf2874cddcf8bbc8844119c1836

Contents?: true

Size: 538 Bytes

Versions: 5

Compression:

Stored size: 538 Bytes

Contents

require "outpost/aggregator/version"
require "outpost/aggregator/json_input"
require "outpost/aggregator/simple_json"

module Outpost
  module Aggregator
    module Rails
      class Engine < ::Rails::Engine
        config.to_prepare do
          ActiveSupport.on_load(:active_record) do
            ActiveRecord::Base.send :include, Outpost::Aggregator::JsonInput
          end
        end
      end
    end # Rails

    def self.array_to_simple_json(array)
      Array(array).map(&:simple_json)
    end
  end # Aggregator
end # Outpost

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
outpost-aggregator-1.2.0 lib/outpost/aggregator.rb
outpost-aggregator-1.1.3 lib/outpost/aggregator.rb
outpost-aggregator-1.1.2 lib/outpost/aggregator.rb
outpost-aggregator-1.1.1 lib/outpost/aggregator.rb
outpost-aggregator-1.0.0 lib/outpost/aggregator.rb