Rails basic record locking

…i’m a rails newbie…and before i get into rails whole hog… is
rails capable of sensing that a main record is locked out by some one
else and can it also sense a ‘race’ condition or ‘multi-record
interlocking condition’ i will be using oracle not mysql…can rails
prevent these…??? so if a user is updating main record with id=5 and
another user tries to request id=5 at the same time will rails be
‘smart’ enough to message this new user that record id=5 is busy? or if
two users inadvertantly try to change a related reference record even
though they have different ‘main record’ id# one will be ‘notified’ of
this ‘race’ condition? …tia dave