Model Your Data
In this section, you can learn how to model data in Mongoid.
Include the Document Module in Your Model: Learn about the
Document
module.Field Types: Learn about the field types that you can use in Mongoid to define the schema for your MongoDB documents.
Customize Field Behaviors: Learn how to customize the behaviors of fields in Mongoid to meet your application requirements.
Inheritance: Learn how to implement inheritance in your model classes.
Document Validation: Learn how to create document validation rules for your model classes.
Customize Callbacks for Data Models: Learn how to implement callbacks to customize the life cycle of your models.
Associations: Learn how to create and manage data associations between your model classes.
Optimize Queries With Indexes: Learn how to create and manage indexes for your model classes.