##// END OF EJS Templates
Use #none for empty scope....
Jean-Philippe Lang -
r15865:8615dc0bcec5
parent child
Show More
@@ -89,7 +89,7 class Issue < ActiveRecord::Base
89 }
89 }
90 scope :fixed_version, lambda {|versions|
90 scope :fixed_version, lambda {|versions|
91 ids = [versions].flatten.compact.map {|v| v.is_a?(Version) ? v.id : v}
91 ids = [versions].flatten.compact.map {|v| v.is_a?(Version) ? v.id : v}
92 ids.any? ? where(:fixed_version_id => ids) : where('1=0')
92 ids.any? ? where(:fixed_version_id => ids) : none
93 }
93 }
94 scope :assigned_to, lambda {|arg|
94 scope :assigned_to, lambda {|arg|
95 arg = Array(arg).uniq
95 arg = Array(arg).uniq
General Comments 0
You need to be logged in to leave comments. Login now