Sha256: e4c5c01b3d63f267b5650ef7d8290f90e63b1f9782951f546ea5688d12c1aaf2
Contents?: true
Size: 610 Bytes
Versions: 71
Compression:
Stored size: 610 Bytes
Contents
# frozen_string_literal: true module ActionText module Serialization extend ActiveSupport::Concern class_methods do def load(content) new(content) if content end def dump(content) case content when nil nil when self content.to_html when ActionText::RichText content.body.to_html else new(content).to_html end end end # Marshal compatibility class_methods do alias_method :_load, :load end def _dump(*) self.class.dump(self) end end end
Version data entries
71 entries across 66 versions & 6 rubygems