Skip to content
This repository has been archived by the owner on Dec 1, 2017. It is now read-only.

Commit

Permalink
explicit iterator name
Browse files Browse the repository at this point in the history
  • Loading branch information
mjankowski committed Jan 20, 2011
1 parent a0b3b68 commit b0b56b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pacecar/ranking.rb
Expand Up @@ -17,7 +17,7 @@ def define_ranking_scope(association, name, direction)
scope "#{name}_#{association}",
:select => "#{quoted_table_name}.*, count(#{reflections[association].quoted_table_name}.#{connection.quote_column_name reflections[association].primary_key_name}) as #{association}_count",
:joins => "inner join #{association} on #{association}.#{reflections[association].primary_key_name} = #{quoted_table_name}.#{connection.quote_column_name primary_key}",
:group => safe_column_names.collect { |name| "#{quoted_table_name}.#{connection.quote_column_name(name)}" }.join(', '),
:group => safe_column_names.collect { |column_name| "#{quoted_table_name}.#{connection.quote_column_name(column_name)}" }.join(', '),
:order => "#{association}_count #{direction}"
end

Expand Down

0 comments on commit b0b56b1

Please sign in to comment.