Class: Ransack::Adapters::Mongoid::InquiryHash

Inherits:
Hash
  • Object
show all
Defined in:
lib/ransack/adapters/mongoid/inquiry_hash.rb

Instance Method Summary collapse

Methods inherited from Hash

#to_inquiry

Instance Method Details

#and(other) ⇒ Object


10
11
12
# File 'lib/ransack/adapters/mongoid/inquiry_hash.rb', line 10

def and(other)
  { '$and' => [ self, other] }.to_inquiry
end

#or(other) ⇒ Object


6
7
8
# File 'lib/ransack/adapters/mongoid/inquiry_hash.rb', line 6

def or(other)
  { '$or' => [ self, other] }.to_inquiry
end