Sha256: 9c13dcb992c4a5a8e4525c5e47af5b68257703bf03b414b5f9ac2f54a2c08afc
Contents?: true
Size: 373 Bytes
Versions: 22
Compression:
Stored size: 373 Bytes
Contents
module Ransack module Adapters module Mongoid class InquiryHash < Hash def or(other) { '$or' => [ self, other] }.to_inquiry end def and(other) { '$and' => [ self, other] }.to_inquiry end end end end end class Hash def to_inquiry ::Ransack::Adapters::Mongoid::InquiryHash[self] end end
Version data entries
22 entries across 22 versions & 3 rubygems