Module: Hyrax::Suppressible
- Extended by:
- ActiveSupport::Concern
- Included in:
- WorkBehavior
- Defined in:
- app/models/concerns/hyrax/suppressible.rb
Overview
A work should be able to be filtered out of search results if it’s inactive
Instance Method Summary collapse
-
#suppressed? ⇒ Boolean
deprecated
Deprecated.
use
Hyrax::ResourceStatusinstead. in most cases, #suppressed? is being called on a SolrDocumentBehavior. we continue to indexsuppressed_bsiand expose its value as an attribute on solr document objects.
Instance Method Details
#suppressed? ⇒ Boolean
use Hyrax::ResourceStatus instead. in most cases, #suppressed? is being called on a Hyrax::SolrDocumentBehavior. we continue to index suppressed_bsi and expose its value as an attribute on solr document objects.
Used to restrict visibility on search results for a work that is inactive. If the state is not set, the default behavior is to consider the work not to be suppressed.
Override this method if you have some criteria by which records should not display in the search results.
22 23 24 |
# File 'app/models/concerns/hyrax/suppressible.rb', line 22 def suppressed? Hyrax::ResourceStatus.new(resource: self).inactive? end |