Hi,

It seems to me that this bug should be reassigned to
ruby-activerecord-3.2. The Arel::Relation module was already empty in
the 3.2 version of Arel (and mentionned as deprecated).

There is a patch upstream to remove (useless) usage of Arel::Relation in
ruby-activerecord.

https://github.com/rails/rails/commit/2fa7ccf7aee3696e99f1b528db848aff5a671f77

I've successfully installed redmine-sql with a version of
ruby-activerecord-3.2 with a trivial backport of this patch (attached) and
ruby-arel 4.0-1 from the archive.

Cédric
Description: Remove Arel::Relation constant from PredicateBuilder.
Origin: https://github.com/rails/rails/commit/2fa7ccf7aee3696e99f1b528db848aff5a671f77
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=720141
Author: Juanjo Bazán <jjba...@gmail.com>
Reviewed-by: Cédric Boutillier <bou...@debian.org>
Last-Update: 2013-08-21

---
 activerecord/lib/active_record/relation/predicate_builder.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/lib/active_record/relation/predicate_builder.rb
+++ b/lib/active_record/relation/predicate_builder.rb
@@ -28,7 +28,7 @@
             attribute.in(value.arel.ast)
           when Array, ActiveRecord::Associations::CollectionProxy
             values = value.to_a.map {|x| x.is_a?(ActiveRecord::Base) ? x.id : x}
-            ranges, values = values.partition {|v| v.is_a?(Range) || v.is_a?(Arel::Relation)}
+            ranges, values = values.partition {|v| v.is_a?(Range)}
 
             array_predicates = ranges.map {|range| attribute.in(range)}
 
@@ -44,7 +44,7 @@
             end
 
             array_predicates.inject {|composite, predicate| composite.or(predicate)}
-          when Range, Arel::Relation
+          when Range
             attribute.in(value)
           when ActiveRecord::Base
             attribute.eq(value.id)

Reply via email to