I have a model which holds a counter field, the field have to be
incremented frequently to record the access frequency of the specific
@obj = Temp.find(id)
@obj.counter += 1
The implementation seems quite simple, but I am worrying about the
race condition (if there are any, I do not know whether rails is
thread-safe) since these statements may be interleaved. Could anyone
help about this? Thanks very much!