Sha256: 95788b3d1129794b11a41e279160552e9a3e3ac8a5adeb4272942ba47bec1dd7
Contents?: true
Size: 423 Bytes
Versions: 36
Compression:
Stored size: 423 Bytes
Contents
class ContentText < ApplicationRecord include Concerns::ContentType # This triggers the searchable instance's after_save callback, which # in turn updates all search indices. after_save { parent.save! if linked_to_searchable_parent? } def content_type :text end def linked_to_searchable_parent? column.present? && parent.present? && parent.respond_to?(:searchable?) && parent.searchable? end end
Version data entries
36 entries across 36 versions & 1 rubygems