I have a project build using Rails 4.2.5
When I have my code like
@job = Job.find(1)
update_job(attrs)
If any method is before_* returns false after_rollback is called but when I change my code to
@job = Job.find(1)
@job.with_lock('FOR UPDATE NOWAIT') do
update_job(attrs)
end
after_rollback is not called. I am using postgresql 9.3 and 9.5 for my database.
Above code inside with_lock block seems to be working with 9.4.4