1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/lib/active_record/locking
John Mileham b5e670a9dd Accept optional transaction args to #with_lock
Make #with_lock as expressive as calling #transaction and #lock!
individually to enable behavior like so:

    person.with_lock("FOR UPDATE NOWAIT", requires_new: true) do
      ...
    end

Helps teams who prefer #with_lock over #lock! to ensure the lock is
taken out within a transaction, even when advanced transaction control
is required without requiring redundant transaction blocks.
2021-09-23 09:43:00 -04:00
..
optimistic.rb Standardize nodoc comments 2021-07-29 21:18:07 +00:00
pessimistic.rb Accept optional transaction args to #with_lock 2021-09-23 09:43:00 -04:00