1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-19 23:11: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:
Toshi MARUYAMA 2014-10-24 02:18:28 +00:00
parent b43a4f048e
commit 374f4dd52e

View File

@ -77,7 +77,7 @@ class Issue < ActiveRecord::Base
attr_protected :id
scope :visible, lambda {|*args|
joins(:project).
includes(:project).
references(:project).
where(Issue.visible_condition(args.shift || User.current, *args))
}