Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Pessimistic locking in rails 3.0.3

#6075

Trying to use either the lock! method, or the :lock => true argument to finder methods, AR no longer performs a SELECT ... FOR UPDATE query. In all cases I'm calling these methods within the scope of a transaction.

I'm using the mysql2 gem and my app was created only today using rails 3.0.3 and ruby 1.9.2-p0.

Reported by noodl · November 27th, 2010 @ 02:34 PM

State: resolved
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Denis Odorcic
    Denis Odorcic

    Fixed in Arel (https://github.com/rails/arel/commit/3e928ee400d083e7391474c61c8fce...)
    If you specify

    gem 'arel', :git => 'git://github.com/rails/arel.git'
    

    in your Gemfile you shouldn't run into the problem anymore as far as I can tell.

    November 27th, 2010 @ 07:13 PM

  2. noodl
    noodl

    That does it! Thanks for the quick fix.

    November 27th, 2010 @ 11:37 PM

  3. Aditya Sanghi
    Aditya Sanghi
    • State changed from new to resolved
    • Importance changed from to Low

    November 29th, 2010 @ 01:30 PM