I’m slogging through the book and ran into a validation that tests for
uniqueness of the “title” for my shopping cart.
It’s obvious from looking at the database that this is not a property
that is incorporated into the database itself but in the ruby code that
acts as the model.
I have a serious problem with this…
First, I know that someone will eventually plug into the database
directly and modify the data. I’ve been doing this stuff too long to
Second, this is much more intensive than just plugging in a unique index
requirement on the database.
I would like to know IF there is a way to designate these data integrity
checks into the database via the rails framework and if not, has there
been any discussion to doing this? The database is going to be much
better at validating it’s data than the framework will because it’s