Git Product home page Git Product logo

mongoid.github.io's Introduction

Mongoid

This is the legacy fork which is no longer maintained. The official repository is now under the MongoDB organization here.

mongoid.github.io's People

Contributors

arthurnn avatar cgriego avatar dblock avatar dependabot[bot] avatar durran avatar noraj avatar tombruijn avatar tomk32 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mongoid.github.io's Issues

Should we update the origin docs?

I could be missing something, but as far as I understood and tested, this wont work:

class Criteria
  include Origin::Queryable
end

criteria = Criteria.new
criteria.where(name: "Syd").gt(age: 10).desc(:created_at)

criteria.selector #=> { name: "Syd", age: { "$gt" => 10 }}
criteria.options  #=> { sort: { created_at: -1 }}

the right approach for it is:

class Criteria
  include Origin::Queryable
end

criteria = Criteria.new
criteria = criteria.where(name: "Syd").gt(age: 10).desc(:created_at)

criteria.selector #=> { name: "Syd", age: { "$gt" => 10 }}
criteria.options  #=> { sort: { created_at: -1 }}

as Origin doest not modify the object.

Looks like that the docs are bad everywhere, is this a bug? if so I can fix it and pull request in the next minutes, otherwise let me know..

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.