Sha256: 55f59622d9726b5bfc9efdf96a7f842b9230e99324ea9d020da2bab862cc8400
Contents?: true
Size: 481 Bytes
Versions: 13
Compression:
Stored size: 481 Bytes
Contents
module Calagator class Event < ActiveRecord::Base class SearchEngine cattr_accessor(:kind) { :sql } def self.search(*args) search_engine.search(*args) end def self.use(kind) self.kind = kind search_engine.configure if search_engine.respond_to?(:configure) end def self.score? search_engine.score? end private_class_method def self.search_engine kind == :sunspot ? ApacheSunspot : Sql end end end end
Version data entries
13 entries across 13 versions & 2 rubygems