mongoid
AGENTS.md3.9k starsChanged 2 months agoMITView on GitHub
Mongoid is a Ruby Object-Document Mapper (ODM) framework for MongoDB. Mongoid allows developers to define their data models using Ruby classes, and it handles the mapping between these classes and the underlying MongoDB collections. It is built on top of the MongoDB Ruby driver, and is intended to be a (mostly) drop-in replacement for ActiveRecord in Ruby on Rails applications. The project targets Ruby 2.7+. Do not use syntax or stdlib features unavailable in Ruby 2.7. Tests require a running…
Trending
Quiet since September.about the whole repository
Who's talking about mongodb/mongoid
- activedocument/activedocument“ActiveDocument Roadmap”GitHub · May 17, 2024 · 8 reactions
- ruby/ruby2_keywords“How should projects depend on ruby2_keywords?”GitHub · Aug 3, 2021 · 7 reactions
- thetron/mongoid_token“Allow Mongoid 5.1”GitHub · Mar 13, 2016 · 4 reactions
- kaminari/kaminari-mongoid“Use estimated_count instead of size on unfiltered criterias with Mongoid >= 7.2.0”GitHub · Feb 17, 2022 · 3 reactions
- A Hacker News story“Mongoid 9.0 Released”Hacker News · May 1, 2024 · 2 points
The biggest 5 of 43 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 43
Talked about on GitHub and Hacker News (43 times).
On GitHub · 42
- May 17, 2024ActiveDocument Roadmap — activedocument/activedocument8 reactions
- Aug 3, 2021How should projects depend on ruby2_keywords? — ruby/ruby2_keywords7 reactions · 1 comment
- Mar 13, 2016Allow Mongoid 5.1 — thetron/mongoid_token4 reactions
- Feb 17, 2022Use estimated_count instead of size on unfiltered criterias with Mongoid >= 7.2.0 — kaminari/kaminari-mongoid3 reactions
- Oct 22, 2022inserted_at timestamp is greater than updated_at timestamp for new documents — zookzook/elixir-mongodb-driver1 reaction · 1 comment
37 more on GitHub
- Mar 3, 2022Add Ruby 3.1 and 3.2 to the CI matrix and fix CI failure in Ruby 3 — drapergem/draper1 reaction · 5 comments
- Mar 13, 2016Allow Mongoid 5.1 — thetron/mongoid-enum1 reaction · 1 comment
- Sep 25, 2026Bump mongoid from 9.1.0 to 9.1.1 — DEFRA/waste-carriers-engine0 reactions
- Sep 24, 2026Bump mongoid from 9.1.0 to 9.1.1 — zabry/backend0 reactions
- Sep 24, 2026Bump mongoid from 9.1.0 to 9.1.1 — 9xRahul/ebook_backend0 reactions
- Sep 23, 2026chore(deps): bump mongoid from 9.1.0 to 9.1.1 — DaviSFS21/e-commerce0 reactions · 1 comment
- Sep 22, 2026build(deps): bump mongoid from 9.1.0 to 9.1.1 — Estebanquitowo/Software_arch_team_40 reactions
- Sep 22, 2026Bump the mongo group across 1 directory with 2 updates — alphagov/asset-manager0 reactions · 2 comments
- Sep 21, 2026Bump mongoid from 9.1.0 to 9.1.1 — Divyanshu-2907/MiniSERP0 reactions
- Sep 21, 2026chore(deps): bump mongoid from 9.1.0 to 9.1.1 — Joseph-Mutua/query-pulse0 reactions
- Sep 14, 2026Bump mongoid from 9.0.11 to 9.1.0 in /backend — rubyforgood/Flaredown0 reactions
- Aug 19, 2026Bump mongoid from 9.0.10 to 9.1.0 — fullhealthmedical/health_wallet0 reactions
- Jul 30, 2026Bump mongoid from 9.0.10 to 9.1.0 — s33dco/health_wallet0 reactions
- Jul 20, 2026Bump mongoid from 9.0.10 to 9.1.0 — pezholio/health_wallet0 reactions
- Jul 6, 2026Bump mongoid from 9.0.10 to 9.1.0 — mikey-roberts/health_wallet0 reactions
- Jun 26, 2026Bump mongoid from 9.0.10 to 9.1.0 — chemos57/health_wallet0 reactions
- Jun 22, 2026Bump mongoid from 9.0.10 to 9.1.0 — tomosjohnrees/health_wallet0 reactions
- May 17, 2026Bump mongoid from 9.0.10 to 9.1.0 — nricaurte/pokemon_mpc0 reactions
- May 16, 2026build(deps): bump mongoid from 9.0.10 to 9.1.0 — Demontrick/app-intelligence-api0 reactions
- May 16, 2026Bump mongoid from 9.0.11 to 9.1.0 — daniel-arenas-ror/game_platform0 reactions
- May 16, 2026Bump mongoid from 9.0.10 to 9.1.0 — Crilorbre97/ruby-mongo0 reactions
- May 15, 2026Bump mongoid from 9.0.10 to 9.1.0 — Usukhbayar418/rails-recipe-api0 reactions
- May 14, 2026build(deps): bump mongoid from 9.0.10 to 9.1.0 — AgikAp/test-alodokter-backend0 reactions
- May 14, 2026chore(deps): bump mongoid from 9.0.10 to 9.1.0 — georgeu2000/persistent-agent0 reactions
- May 14, 2026Bump mongoid from 9.0.10 to 9.1.0 — andrysetiawan/appointment-api0 reactions
- May 13, 2026Bump mongoid from 9.0.11 to 9.1.0 — sakshamjain0464/bookshelf_app_ruby0 reactions
- May 13, 2026Bump mongoid from 9.0.11 to 9.1.0 — nanditaraj03/bookshelf0 reactions
- May 13, 2026Bump mongoid from 9.0.10 to 9.1.0 — guimelo03/ApiQuotesApp0 reactions
- May 13, 2026build(deps-dev): Bump mongoid from 8.1.12 to 9.1.0 — Manwinder4u/mongo-blob0 reactions
- May 13, 2026Bump mongoid from 9.0.10 to 9.1.0 — sandeepm96/question-bank-api0 reactions
- May 13, 2026chore(deps): bump mongoid from 9.0.11 to 9.1.0 — prcongithub/pitch-signal0 reactions
- May 13, 2026Bump mongoid from 9.0.10 to 9.1.0 — ruby-benchmark/errbit0 reactions · 2 comments
- May 13, 2026Bump mongoid from 9.0.11 to 9.1.0 in /spec/tester_mongo — oxeanbits/graphoid0 reactions
- May 13, 2026Bump mongoid from 9.0.10 to 9.1.0 — lucasleandro1/Challenge_tech0 reactions
- May 12, 2026Bump mongoid from 9.0.10 to 9.1.0 — trinaldi/pg-mongo-benchmark0 reactions
- May 12, 2026Bump mongoid from 8.1.12 to 9.1.0 — Lillija/music_app_forfunlesson0 reactions
- Sep 17, 2018New version of mongoid (7.0.2) produced dependency conflicts — devs-for-change/activeadmin-mongoid0 reactions
On Hacker News · 1
- May 1, 2024Mongoid 9.0 Released2 points
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repositoryOne other file it gives its agents.
- CLAUDE.mdCLAUDE.md
The file
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 29
Avoid prefixing a command with environment variables, which makes it harder to teach you about commands that can be executed safely.
- Distinctive: line 33
Run RuboCop after making changes, and always before committing:
- Distinctive: line 49
When writing prose — commit messages, code comments, documentation — be concise, write as a human would, avoid overly complicated …
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Project Description
Mongoid is a Ruby Object-Document Mapper (ODM) framework for MongoDB. Mongoid allows developers to define their data models using Ruby classes, and it handles the mapping between these classes and the underlying MongoDB collections. It is built on top of the MongoDB Ruby driver, and is intended to be a (mostly) drop-in replacement for ActiveRecord in Ruby on Rails applications. The project targets Ruby 2.7+. Do not use syntax or stdlib features unavailable in Ruby 2.7.
Project Structure
lib/: the main source code for Mongoidspec/: RSpec tests for Mongoidexamples/: example scripts showing how to use Mongoidgemfiles/: Gemfiles for testing different usage scenarios (standard.gemfileis the default, used for development, testing, and production)perf/: performance and benchmark scripts
Development Workflow
Running tests
Tests require a running MongoDB instance. Set the URI via the MONGODB_URI environment variable:
export MONGODB_URI="mongodb://localhost:27017,localhost:27018,localhost:27019/"
bundle exec rspec spec/path/to/spec.rbA replica set is typically available locally at localhost:27017,27018,27019.
Environment Variables
Avoid prefixing a command with environment variables, which makes it harder to teach you about commands that can be executed safely. Prefer instead to set environment variables first, and then invoke the command.
Linting
Run RuboCop after making changes, and always before committing:
bundle exec rubocop lib/mongoid/changed_file.rb spec/mongoid/changed_file_spec.rbPass the specific files you modified.
RuboCop is configured with performance, rake, and rspec plugins (.rubocop.yml).
Commit convention
Prefix commit messages with the JIRA ticket: MONGOID-#### Short description. The ticket number is typically in the branch name.
Prose style
When writing prose — commit messages, code comments, documentation — be concise, write as a human would, avoid overly complicated sentences, and use no emojis.
Definition of done
Always run the relevant spec file(s) against the local cluster before considering a task complete. Running tests is not optional. "Relevant" means: the spec file for each class you changed, plus any integration specs that exercise the affected feature. If MongoDB is not reachable, report this to the user rather than trying to work around it.
Thread, fiber, and multi-cluster safety
Query state is stored on the current thread or fiber (depending on Mongoid::Config.isolation_level). Mongoid::Document classes may exist in different database clusters. When writing or modifying code that touches query scoping, persistence, or shared state, always consider multi-threaded, multi-fiber, and multi-cluster scenarios. Use existing synchronization primitives in the codebase rather than introducing new ones.
Code Reviews
See .github/code-review.md for code review guidelines.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

