app/models/concerns/searchable.rb
# Override this method if you need to customize the logic that determines
# if a record is published, or should be indexed for the public.
Override this method if you need to customize the logic that determines
if a record is published, or should be indexed for the public.
Override this method if you need to customize the logic that determines if a record is published or should be indexed for the public .
def indexable_for_elasticsearch?
    if self.respond_to?(:statusable?)
      self.try(:published?)
    else
      true
    end
  end
def indexable_for_elasticsearch? if self . respond_to? ( :statusable? ) self . try ( :published? ) else true end end
Override this method if you need to customize the logic that determines
if a record is published, or should be indexed for the public.
Override this method if you need to customize the logic that determines if a record is published or should be indexed for the public .