Summary
In this chapter, we saw what Mongoid documents are and their various characteristics. We saw how various attributes such as arrays and hashes are stored. Using Mongoize and custom serialization, we can create new data types in Mongoid and use them in our models. We also saw things such as field aliasing, localization, and even mass assignment.
In the next chapter, we shall dig deep into Origin and see the various ways to persist data. We shall see various validations that are leveraged from ActiveModel, callbacks, and even atomic updates.