After installing the PessimisticLocking plugin I noticed that
ActiveRecord’s count method no longer works (see below). If I remove
the plugin it resolves the problem.
I need both. Any ideas?
I have also read that Pessimistic Locking is now baked into ActiveRecord
in Edge Rails. I have tried Rails 1.1.2 and 1.1.4 and that doesn’t seem
to be the case. Any idea when it’ll be in a production release?
- Don
Job.count
ArgumentError: wrong number of arguments (2 for 3)
from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/calculations.rb:156:in
add_limit!' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/calculations.rb:156:in
construct_calculation_sql’
from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/calculations.rb:161:in
execute_simple_calculation' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/calculations.rb:141:in
calculate’
from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/calculations.rb:64:in
`count’
from (irb):1