Permalink
Browse files

Remove unncessary arguments passed to arel_table

  • Loading branch information...
1 parent d200d08 commit fc94c03c1d509eda7f87ab216e8d1115afbfd1ed @lifo lifo committed Jan 1, 2010
@@ -1751,7 +1751,7 @@ def select_limited_ids_array(options, join_dependency)
def construct_finder_sql_for_association_limiting(options, join_dependency)
scope = scope(:find)
- relation = arel_table(options[:from])
+ relation = arel_table
for association in join_dependency.join_associations
relation = association.join_relation(relation)
@@ -1764,6 +1764,7 @@ def construct_finder_sql_for_association_limiting(options, join_dependency)
order(construct_order(options[:order], scope)).
limit(construct_limit(options[:limit], scope)).
offset(construct_limit(options[:offset], scope)).
+ from(options[:from]).
select(connection.distinct("#{connection.quote_table_name table_name}.#{primary_key}", construct_order(options[:order], scope(:find)).join(",")))
relation.to_sql
@@ -78,7 +78,7 @@ def update_with_lock(attribute_names = @attributes.keys) #:nodoc:
attribute_names.uniq!
begin
- arel_table = self.class.arel_table(self.class.table_name)
+ arel_table = self.class.arel_table
affected_rows = arel_table.where(
arel_table[self.class.primary_key].eq(quoted_id).and(

0 comments on commit fc94c03

Please sign in to comment.