On May 3, 2006, at 12:06 AM, Trevor S. wrote:
you mention that you wouldn’t use save_without_validation and then
propose using update_attribute.
Yes I did. I said that, because I don’t like the idea of explicitly
telling the entire model to save itself, but skip all the validation
that I’ve added to make sure that a full model object is valid. At
least, not in my production code.
I’m guessing that you’re not aware that update_attribute (the
singular version of the method) does not trigger validation - check
the API docs for more information.
Actually, I did read that, and that’s pretty much what I was trying
to say in my message. However, I managed to confuse “save the whole
model object” with “run validation on the model object when saving”.
As you (and the API docs point out, those aren’t the same thing.
Thanks for clearing up what I managed to get quite confused about.
I suppose it’s a style/philosophical thing, but I have no problem
with the implicit “skipping” of validation that comes from using
update_attribute. That’s a designed feature of that method. But
save_without_validation just gives me a weird feeling. Not sure I can
explain it better than that…