Sha256: 0dbfc23c052db48222371fc93b0d80a3fa3527d5ec1ae8e1b17a9c6bbfbbd09a

Contents?: true

Size: 495 Bytes

Versions: 1

Compression:

Stored size: 495 Bytes

Contents

module ActiveModel
  module Serializers
    module Msgpack
      def to_msgpack(options = {})
        options = {:out => options} if options.is_a?(String)
        options[:out] ||= ''

        options[:out] << serializable_hash(options).to_msgpack
      end

      # TODO:  Test and uncomment this method
      #def from_msgpack(msg)
      #  MessagePack.unpack(msg)
      #end
    end
  end
end

module ActiveRecord
  module Serialization
    include ActiveModel::Serializers::Msgpack
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
msgpack-rails-0.0.1 lib/msgpack_rails/3/msgpack_serializer.rb