Sha256: a4a844d279c0b100ebb0d969bcb23e3f53bc0e1281038d3431a55c3cc37c5b2b

Contents?: true

Size: 628 Bytes

Versions: 1

Compression:

Stored size: 628 Bytes

Contents

require "active_support"
require "msgpack_rails/version"
require "msgpack_rails/activesupport/message_pack"

module ActiveSupport
  eager_autoload do
    autoload :MessagePack
  end
end

if defined?(ActiveModel)
  require "msgpack_rails/activemodel/serializers/message_pack"

  module ActiveModel
    module Serializers
      eager_autoload do
        autoload :MessagePack
      end
    end
  end
end

if defined?(::Rails)
  module MsgpackRails
    class Rails < ::Rails::Engine
      initializer "msgpack_rails" do
        ::ActiveRecord::Base.send(:include, ActiveModel::Serializers::MessagePack)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
msgpack_rails-0.3.0 lib/msgpack_rails.rb