Method: MetaSearch::Builder#build

Defined in:
lib/meta_search/builder.rb

#build(option_hash) ⇒ Object

Build the search with the given search options. Options are in the form of a hash with keys matching the names creted by the Builder’s “wheres” as outlined in MetaSearch::Where



83
84
85
86
87
88
89
90
# File 'lib/meta_search/builder.rb', line 83

def build(option_hash)
  opts = option_hash.dup || {}
  @relation = @base.scoped
  opts.stringify_keys!
  opts = collapse_multiparameter_options(opts)
  assign_attributes(opts)
  self
end