Replies: 1 comment 2 replies
-
Hey @gfody, Mongoid's Validation is effectively the same as Rail's Active Record Validations. As this is a client-side feature there's nothing MongoDB can enforce server-side. If your question is about server-side schema validation this is better handled when a collection is created (or collection metadata is managed). You could potentially do this using Mongoid, but that may not be the best place for that logic to live. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
warning: I am new to mongoid - this may be a dumb question
in our model classes we have code like
I'm told that the
index
statements cause indexes to be created in mongo but thevalidates
statements are only enforced locally.Is there a statement that will cause validators to be created in mongo?
Beta Was this translation helpful? Give feedback.
All reactions