Problem::
Is there a way to limit a table to one entry only?
I would like to do this from the model so only one entry can be created and modified. Currently I am only allowing the Object.first entry to be modified. I am also open to hear a better practice. Thanks in advance
background::
I am new to Mongo and the only information i found is for creating a new collection.
With Mongo DB you can limit with Capped Collections.
Set limits on mongo db collection
"Mongoid does not provide a mechanism for creating capped collections on the fly - you will need to create these yourself one time up front either with Moped or via the Mongo console."
https://mongoid.github.io/old/en/mongoid/docs/persistence.html
session.command(create: "name", capped: true, size: 10000000, max: 1000)