Check for special case with the Issue.find to not conflict with Search, #1347

This commit is contained in:
Eric Davis
2008-06-19 14:59:40 -07:00
parent 63ba3fafc7
commit 5431df3d8d
+4 -2
View File
@@ -23,8 +23,10 @@ module IssuePatch
def find(*args)
# Options defined
if args[1].is_a?(Hash)
# include used?
if args[1].has_key?(:include) && !args[1][:include].nil?
# Abort the special case of issue.search. LIKE is used by search
if args[1].has_key?(:conditions) && args[1][:conditions].is_a?(Array) && args[1][:conditions][0].match(/LIKE \?/)
# skip
elsif args[1].has_key?(:include) && !args[1][:include].nil? # include used?
# Add our include
args[1][:include] << :deliverable
else