Sha256: 788d7223564607e4269f38ca980b42a90f4101b2c62b3b10d03d6950a5c18f1d
Contents?: true
Size: 549 Bytes
Versions: 24
Compression:
Stored size: 549 Bytes
Contents
module Actions module Serializers class ActiveRecordSerializer < ::Dynflow::Serializers::Noop def serialize(arg) if arg.is_a? ActiveRecord::Base { :active_record_object => true, :class_name => arg.class.name, :id => arg.id } else super arg end end def deserialize(arg) if arg.is_a?(Hash) && arg[:active_record_object] arg[:class_name].constantize.find(arg[:id]) else super arg end end end end end
Version data entries
24 entries across 24 versions & 1 rubygems