karmi/tire — Issue #157: Conflicts with Mongoid search
Author: christianhellsten
Created: 2011-12-02 12:10:46+00:00
State: open

This class:

class XXX
index :slug

# Must be included after Mongoid, Tire#index conflicts with Mongoid#index otherwise
include Tire::Model::Search
include Tire::Model::Callbacks

will not be searchable with Mongoid 2.3.4. The search method is implemented by Mongoid, so instead of performing a search through Tire it will return e.g.:

XXX.search('yyy')
=> [:ids,
#"yyy", :deleted_at=>nil},
options: {},
class: XXX,
embedded: false>