Sha256: a450299f4e858b9747571141595e16a0f5a9e6cd832b5f63af3437dec22f2d9b

Contents?: true

Size: 387 Bytes

Versions: 24

Compression:

Stored size: 387 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.searchable?
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
udongo-6.5.0 app/models/content_text.rb
udongo-6.4.1 app/models/content_text.rb
udongo-6.4.0 app/models/content_text.rb
udongo-6.3.2 app/models/content_text.rb
udongo-6.3.1 app/models/content_text.rb
udongo-6.3.0 app/models/content_text.rb
udongo-6.2.1 app/models/content_text.rb
udongo-6.2.0 app/models/content_text.rb
udongo-6.1.0 app/models/content_text.rb
udongo-6.0.0 app/models/content_text.rb
udongo-5.9.0 app/models/content_text.rb
udongo-5.8.0 app/models/content_text.rb
udongo-5.7.0 app/models/content_text.rb
udongo-5.6.0 app/models/content_text.rb
udongo-5.5.0 app/models/content_text.rb
udongo-5.4.0 app/models/content_text.rb
udongo-5.3.1 app/models/content_text.rb
udongo-5.3.0 app/models/content_text.rb
udongo-5.2.0 app/models/content_text.rb
udongo-5.1.0 app/models/content_text.rb