Sha256: 79b63b5266a4470db4a8b971a07049b1b0a204d3342588ca27ad01ba3d9e8796

Contents?: true

Size: 358 Bytes

Versions: 9

Compression:

Stored size: 358 Bytes

Contents

module CanTango::Adaptor
  module Mongo
    #include CanTango::daptor::Generic
    # using #in on Hash (Mongoid query)
    def include_condition attribute, candidate
      { attribute.to_sym.in => candidate.send(attribute) }
    end

    def attribute_condition attribute, user_scope
      { attribute.to_sym => candidate.send(attribute) }
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cantango-core-0.1.9.3 lib/cantango/adaptor/mongo.rb
cantango-core-0.1.9.2 lib/cantango/adaptor/mongo.rb
cantango-core-0.1.9.1 lib/cantango/adaptor/mongo.rb
cantango-core-0.1.9 lib/cantango/adaptor/mongo.rb
cantango-core-0.1.8 lib/cantango/adaptor/mongo.rb
cantango-core-0.1.7 lib/cantango/adaptor/mongo.rb
cantango-core-0.1.6 lib/cantango/adaptor/mongo.rb
cantango-core-0.1.5 lib/cantango/adaptor/mongo.rb
cantango-core-0.1.4 lib/cantango/adaptor/mongo.rb