try to only catch conditions when a find is involved

This commit is contained in:
Jack Dempsey 2010-02-04 23:27:37 +08:00 committed by Jeremy McAnally
parent ca96342054
commit 4ce16b80b7

View File

@ -23,7 +23,7 @@ module Rails
# Check for deprecated ActiveRecord calls
def check_ar_methods
files = []
["find(:all", "find(:first", ":conditions =>", ":joins =>"].each do |v|
["find(:all", "find(:first", "find.*:conditions =>", ":joins =>"].each do |v|
lines = grep_for(v, "app/")
files += extract_filenames(lines) || []
end