From 7bd0d634867ccbdf4537ba3d62b865b1cb7beebf Mon Sep 17 00:00:00 2001 From: Nick Kallen Date: Sun, 16 Mar 2008 17:27:40 -0700 Subject: allowing string passthrough for order clauses --- lib/active_relation/primitives/attribute.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/active_relation/primitives') diff --git a/lib/active_relation/primitives/attribute.rb b/lib/active_relation/primitives/attribute.rb index ddf5ef5e07..d78e940ffc 100644 --- a/lib/active_relation/primitives/attribute.rb +++ b/lib/active_relation/primitives/attribute.rb @@ -63,31 +63,31 @@ module ActiveRelation module Predications def eq(other) - Equality.new(self, other) + Equality.new(self, other.bind(relation)) end def lt(other) - LessThan.new(self, other) + LessThan.new(self, other.bind(relation)) end def lteq(other) - LessThanOrEqualTo.new(self, other) + LessThanOrEqualTo.new(self, other.bind(relation)) end def gt(other) - GreaterThan.new(self, other) + GreaterThan.new(self, other.bind(relation)) end def gteq(other) - GreaterThanOrEqualTo.new(self, other) + GreaterThanOrEqualTo.new(self, other.bind(relation)) end def matches(regexp) - Match.new(self, regexp) + Match.new(self, regexp.bind(relation)) end def in(array) - In.new(self, array) + In.new(self, array.bind(relation)) end end include Predications -- cgit v1.2.3