]> source.dussan.org Git - redmine.git/commitdiff
Use #none for empty scope.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 21 Jan 2017 10:10:24 +0000 (10:10 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 21 Jan 2017 10:10:24 +0000 (10:10 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@16247 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/issue.rb

index 40a12c0ca9bce388ce3f2abf25201d596705804b..1877ca2c995266905677c5ced6616a56a7635ebb 100644 (file)
@@ -89,7 +89,7 @@ class Issue < ActiveRecord::Base
   }
   scope :fixed_version, lambda {|versions|
     ids = [versions].flatten.compact.map {|v| v.is_a?(Version) ? v.id : v}
-    ids.any? ? where(:fixed_version_id => ids) : where('1=0')
+    ids.any? ? where(:fixed_version_id => ids) : none
   }
   scope :assigned_to, lambda {|arg|
     arg = Array(arg).uniq