So, I pull out my hair, eliminating this error that I was experiencing, and finally discovered that it causes it. It always seemed to me that when I called
@my_model.save(false)
That I would skip my ActiveRecord checks. It turns out that this is partly true. My objects are stored in the DESPITE database of my ActiveRecord scan. My problem exists because one of my checks changes one of the children's models during the checkout process (this is a 24-hour planning app, so when lunches are saved, I check them against the day they save, and the next day as well as to ensure that the user did not mean “2am” for a night shift.
My question is this: is there a way to actually skip my checks and go straight to the database? Is this the usual ActiveRecord behavior or should I dive deeper into my checks? Or am I out of luck and need to rewrite my checks?
source
share