Sha256: 0a425b6da2869e13d435f4053a261af705ab42e382a2a91b929ad5ba70331170

Contents?: true

Size: 376 Bytes

Versions: 7

Compression:

Stored size: 376 Bytes

Contents

require 'base64'
class Unrelated < ActiveRecord::Base
  class MySerializer
    def initialize(val)
      @val = val
    end

    def self.dump(obj)
      Base64.encode64(Marshal.dump(obj))
    end

    def self.load(str)
      if str
        Marshal.load(Base64.decode64(str))
      end
    end
  end

  serialize :for_yaml
  serialize :for_custom_serialize, MySerializer
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
ar_jdbc_pg_array-0.1.1-java spec/fixtures/unrelated.rb
ar_jdbc_pg_array-0.1.0-java spec/fixtures/unrelated.rb
ar_pg_array-0.10.2 spec/fixtures/unrelated.rb
ar_pg_array-0.11.2 spec/fixtures/unrelated.rb
ar_pg_array-0.11.1 spec/fixtures/unrelated.rb
ar_pg_array-0.11.0 spec/fixtures/unrelated.rb
ar_pg_array-0.10.1 spec/fixtures/unrelated.rb