Class: FacetedSearch::Facets::Text

Inherits:
Default
  • Object
show all
Defined in:
app/models/faceted_search/facets/text.rb

Instance Attribute Summary

Attributes inherited from Default

#facets, #name, #params

Instance Method Summary collapse

Methods inherited from Default

#initialize, #kind, #path, #path_for, #title, #to_s

Constructor Details

This class inherits a constructor from FacetedSearch::Facets::Default

Instance Method Details

#add_scope(scope) ⇒ Object



8
9
10
11
# File 'app/models/faceted_search/facets/text.rb', line 8

def add_scope(scope)
  return scope if params.blank?
  scope.where("#{facets.model_table_name}.#{name} ILIKE ?", "%#{params}%")
end

#placeholderObject



4
5
6
# File 'app/models/faceted_search/facets/text.rb', line 4

def placeholder
  @options[:placeholder]
end