Fixed that open scope on Project#issues raises an error (#11545).

Patch by Petr Pospisil.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10199 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-08-13 14:23:33 +00:00
parent 91c875437d
commit 8fb1a7e3cc
4 changed files with 9 additions and 2 deletions
-1
View File
@@ -64,7 +64,6 @@ class Issue < ActiveRecord::Base
lambda {|*args| { :include => :project,
:conditions => Issue.visible_condition(args.shift || User.current, *args) } }
class << self; undef :open; end
scope :open, lambda {|*args|
is_closed = args.size > 0 ? !args.first : false
{:conditions => ["#{IssueStatus.table_name}.is_closed = ?", is_closed], :include => :status}