Forums » Development »
lib/ar_condition.rb
Added by Trevor Jones over 12 years ago
I've noticed that lib/ar_condition.rb was removed from the lib folder between versions 1.3.3 and 1.4
I've also noticed that a number of plugins seem to rely on this lib file and break after upgrading.
To save others some trouble perhaps this change should be documented on a plugin upgrade wiki page or something.
Does anyone know if the functionality of the ARCondition class is being provided by another class/lib/etc ?
Replies (5)
RE: lib/ar_condition.rb - Added by Alex A over 12 years ago
U can modify plugin by coping old ar_condition.rb file into plugin directory and add
require 'ar_condition'
into init.rb file
RE: lib/ar_condition.rb - Added by Jean-Philippe Lang over 12 years ago
The best option is to update the plugins in order to use ActiveRecord scopes rather then ar_condition.rb
.
RE: lib/ar_condition.rb - Added by Trevor Jones over 12 years ago
I ended up doing exactly what Jean-Philippe suggested. I only had a couple of plugins to update so it was a relatively simple task.
RE: lib/ar_condition.rb - Added by Mikhail Kovalenko over 12 years ago
Would anyone please elaborate on what exactly needs to be done to use ActiveRecord scopes instead of ARCondition? I'm new to Ruby but have a couple of old plugins to fix.
Thank you.
RE: lib/ar_condition.rb - Added by Vivek Jain over 11 years ago
Hello Trevor
can you please provide the code on what exactly you changed and how ?