does anyone know how i can check if a record has a lock in place before
I
attempt to lock the record?
Eg
<-- check here if the specific record is already locked.
if not locked
MyModel.lock!
else
skip to the next model.
thanks
nayeem
does anyone know how i can check if a record has a lock in place before
I
attempt to lock the record?
Eg
MyModel.lock!
thanks
nayeem
2009/6/18 Developer In London [email protected]:
I do not know whether this can be done, but I think that even if it
could it would not be safe. In the gap between testing the lock and
attempting to lock it someone else could lock it themselves so you
would still have to deal with the consequences of attempting to lock
an already locked record.
Colin
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs