Sha256: c02cdb1c4f0dec0bef846049fb3aa71005371e26e081894969394fc43f1014a8
Contents?: true
Size: 631 Bytes
Versions: 22
Compression:
Stored size: 631 Bytes
Contents
# frozen_string_literal: true # :markup: markdown 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
22 entries across 22 versions & 2 rubygems