mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-20 07:21:12 +00:00
use includes instead of joins at Issue#visible
"rake test" passes all test, but following test fails on command line. <pre> $ ruby test/unit/issue_test.rb -n test_visible_scope_for_member_with_groups_should_return_assigned_issues 1) Failure: IssueTest#test_visible_scope_for_member_with_groups_should_return_assigned_issues [test/unit/issue_test.rb:321]: Failed assertion, no message given. </pre> git-svn-id: http://svn.redmine.org/redmine/trunk@13500 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
b43a4f048e
commit
374f4dd52e
@ -77,7 +77,7 @@ class Issue < ActiveRecord::Base
|
|||||||
attr_protected :id
|
attr_protected :id
|
||||||
|
|
||||||
scope :visible, lambda {|*args|
|
scope :visible, lambda {|*args|
|
||||||
joins(:project).
|
includes(:project).
|
||||||
references(:project).
|
references(:project).
|
||||||
where(Issue.visible_condition(args.shift || User.current, *args))
|
where(Issue.visible_condition(args.shift || User.current, *args))
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user