I have one function in model class and inside that function I am doing like this,
def myfun
....
self.lock!
self.name = "hi"
....
....
end
So on above case when will lock release from object?
And here Note : I am not writing this inside the transactions block.