aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation/predicate_builder.rb
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2010-01-02 00:25:29 +0530
committerPratik Naik <pratiknaik@gmail.com>2010-01-02 00:25:29 +0530
commitb35873a575586d31e9de681aec31d4b884b25aba (patch)
tree40dd20edf2c2a8cb29c8c56f3fa748acae66da67 /activerecord/lib/active_record/relation/predicate_builder.rb
parentd2c4b3b672d52cddbc214e0fe5175cc92ca76f92 (diff)
downloadrails-b35873a575586d31e9de681aec31d4b884b25aba.tar.gz
rails-b35873a575586d31e9de681aec31d4b884b25aba.tar.bz2
rails-b35873a575586d31e9de681aec31d4b884b25aba.zip
Rename Model.arel_table to Model.active_relation
Diffstat (limited to 'activerecord/lib/active_record/relation/predicate_builder.rb')
-rw-r--r--activerecord/lib/active_record/relation/predicate_builder.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/relation/predicate_builder.rb b/activerecord/lib/active_record/relation/predicate_builder.rb
index d5e0c90184..6b7d941350 100644
--- a/activerecord/lib/active_record/relation/predicate_builder.rb
+++ b/activerecord/lib/active_record/relation/predicate_builder.rb
@@ -7,20 +7,20 @@ module ActiveRecord
def build_from_hash(attributes, default_table)
predicates = attributes.map do |column, value|
- arel_table = default_table
+ table = default_table
if value.is_a?(Hash)
- arel_table = Arel::Table.new(column, @engine)
- build_from_hash(value, arel_table)
+ table = Arel::Table.new(column, :engine => @engine)
+ build_from_hash(value, table)
else
column = column.to_s
if column.include?('.')
table_name, column = column.split('.', 2)
- arel_table = Arel::Table.new(table_name, @engine)
+ table = Arel::Table.new(table_name, :engine => @engine)
end
- attribute = arel_table[column] || Arel::Attribute.new(arel_table, column.to_sym)
+ attribute = table[column] || Arel::Attribute.new(table, column.to_sym)
case value
when Array, ActiveRecord::Associations::AssociationCollection, ActiveRecord::NamedScope::Scope