Skip to content

Commit

Permalink
Edge Rails got rid of the scope method. Use current_scoped_methods.se…
Browse files Browse the repository at this point in the history
…lect_values instead
  • Loading branch information
packagethief committed Jan 15, 2010
1 parent e114c44 commit 10e06e6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/will_paginate/finder.rb
Expand Up @@ -194,7 +194,9 @@ def wp_count(options, args, finder)
klass = (@owner and @reflection) ? @reflection.klass : self

# Use :select from scope if it isn't already present.
options[:select] = scope(:find, :select) unless options[:select]
if options[:select].blank? && current_scoped_methods
options[:select] = current_scoped_methods.select_values.join(", ")
end

if options[:select] and options[:select] =~ /^\s*DISTINCT\b/i
# Remove quoting and check for table_name.*-like statement.
Expand Down

0 comments on commit 10e06e6

Please sign in to comment.