Class: FacetedSearch::Facets::Search

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

Instance Attribute Summary

Attributes inherited from Default

#facets, #find_by, #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



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

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