Module: PgSearch::ClassMethods

Defined in:
lib/pg_search.rb

Instance Method Summary collapse

Instance Method Details

#multisearchable(options = {}) ⇒ Object



15
16
17
18
19
# File 'lib/pg_search.rb', line 15

def multisearchable(options = {})
  include PgSearch::Multisearchable
  class_attribute :pg_search_multisearchable_options
  self.pg_search_multisearchable_options = options
end

#pg_search_scope(name, options) ⇒ Object



8
9
10
11
12
13
# File 'lib/pg_search.rb', line 8

def pg_search_scope(name, options)
  self.scope(
    name,
    PgSearch::Scope.new(name, self, options).to_proc
  )
end