Sha256: e9601447a5d533ac5f08500a61ff6a0dbbf7f7fed1b5b47ed402456fcd8e1b43
Contents?: true
Size: 614 Bytes
Versions: 14
Compression:
Stored size: 614 Bytes
Contents
# encoding: utf-8 module User class WithFulltext < ActiveRecord::Base self.table_name = 'users_with_fulltext' search_syntax do search_by :city do |scope, city| scope.scoped(:conditions => { :city => city }) end search_by :email do |scope, email| scope.scoped(:conditions => { :email => email }) end end search_syntax do # multiple search_syntax directives are allowed search_by :role do |scope, role| scope.scoped(:conditions => { :role => role }) end end search_text do [name, email, city] end end end
Version data entries
14 entries across 14 versions & 1 rubygems