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 committed 2012-08-13 14:23:33 +00:00
1 parent 91c875437d
commit 8fb1a7e3cc
4 files changed
+9 -2

No files matched your search

-1
View File
@@ -35,7 +35,6 @@ class Version < ActiveRecord::Base
validates_inclusion_of :sharing, :in => VERSION_SHARINGS
scope :named, lambda {|arg| { :conditions => ["LOWER(#{table_name}.name) = LOWER(?)", arg.to_s.strip]}}
class << self; undef :open; end
scope :open, :conditions => {:status => 'open'}
scope :visible, lambda {|*args| { :include => :project,
:conditions => Project.allowed_to_condition(args.first || User.current, :view_issues) } }