I'm seeing weird behavior on my live sites (can't seem to duplicate in
development). Using Ruby 1.8.6 on solaris with postgresql.
I often times have code that looks like:
if user.orders.count >= 50
update_attribute :super, true
That sort of thing, where there's some check in an after_create
callback that does a count and then modifies another object. However,
these callbacks don't seem to be running correctly. Sometimes Users
aren't made super after 50 orders. Or, in this example:
Question.rotate! if question.question_answers.count >= 100
Sometimes Question.rotate! is called if
question.question_answers.count is less than 100. It's very weird.
Anyone see anything like this?