Skip to content

Commit

Permalink
Rails 2.2 fix: stop using extract_attribute_names_from_match inerna…
Browse files Browse the repository at this point in the history
…l AR method, it no longer exists
  • Loading branch information
mislav committed Oct 26, 2008
1 parent f161d99 commit 48fc49c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/will_paginate/finder.rb
Expand Up @@ -222,9 +222,9 @@ def wp_count(options, args, finder)
# scope_out adds a 'with_finder' method which acts like with_scope, if it's present
# then execute the count with the scoping provided by the with_finder
send(scoper, &counter)
elsif match = /^find_(all_by|by)_([_a-zA-Z]\w*)$/.match(finder)
elsif finder =~ /^find_(all_by|by)_([_a-zA-Z]\w*)$/
# extract conditions from calls like "paginate_by_foo_and_bar"
attribute_names = extract_attribute_names_from_match(match)
attribute_names = $2.split('_and_')
conditions = construct_attributes_from_arguments(attribute_names, args)
with_scope(:find => { :conditions => conditions }, &counter)
else
Expand Down

0 comments on commit 48fc49c

Please sign in to comment.