Sha256: 48ad4974268a510bc5c37197e43c7ae5415c7671e2194874c9e739530b92145e

Contents?: true

Size: 333 Bytes

Versions: 4

Compression:

Stored size: 333 Bytes

Contents

require 'active_support/json'

module PaperTrail
  module Serializers
    module Json
      extend self # makes all instance methods become module methods as well

      def load(string)
        ActiveSupport::JSON.decode string
      end

      def dump(object)
        ActiveSupport::JSON.encode object
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
paper_trail_without_deprecated-3.0.0.beta1 lib/paper_trail/serializers/json.rb
paper_trail-3.0.0.beta1 lib/paper_trail/serializers/json.rb
paper_trail-2.7.2 lib/paper_trail/serializers/json.rb
paper_trail-2.7.1 lib/paper_trail/serializers/json.rb