Makes visible scopes accept projects option and deprecate Project.visible_by.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5324 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2011-04-05 12:50:19 +00:00
parent c2095f5e2f
commit 405fc07e90
9 changed files with 44 additions and 23 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ class Issue < ActiveRecord::Base
validates_numericality_of :estimated_hours, :allow_nil => true
named_scope :visible, lambda {|*args| { :include => :project,
:conditions => Issue.visible_condition(args.first || User.current) } }
:conditions => Issue.visible_condition(args.shift || User.current, *args) } }
named_scope :open, :conditions => ["#{IssueStatus.table_name}.is_closed = ?", false], :include => :status