Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

explicit iterator name

  • Loading branch information...
commit b0b56b18621097c5a6db6ea4c323185be7aad729 1 parent a0b3b68
@mjankowski mjankowski authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/pacecar/ranking.rb
View
2  lib/pacecar/ranking.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.