Sha256: 689907046a839b605bc66794497a12b699b40f6fbb1b74029d902e6fc72eabbc
Contents?: true
Size: 504 Bytes
Versions: 16
Compression:
Stored size: 504 Bytes
Contents
# frozen_string_literal: true module Katalyst module Content class Content < Item has_rich_text :content validates :content, presence: true def initialize_copy(source) super self.content = source.content&.body if source.content.is_a?(ActionText::RichText) end def self.permitted_params super + %i[content] end def to_plain_text [super, content.to_plain_text].compact.join("\n") if visible? end end end end
Version data entries
16 entries across 16 versions & 1 rubygems