mirror of
https://github.com/meineerde/redmine.git
synced 2025-10-17 17:01:01 +00:00
use "do end" instead of {} at ActiveRecord scope lambda of app/models/tracker.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20344 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
581fb1f96d
commit
b7d44c8b19
@ -51,7 +51,7 @@ class Tracker < ActiveRecord::Base
|
||||
#
|
||||
# Tracker.visible(user)
|
||||
# => returns the trackers that are visible by the user in at least on project
|
||||
scope :visible, lambda {|*args|
|
||||
scope :visible, (lambda do |*args|
|
||||
user = args.shift || User.current
|
||||
condition = Project.allowed_to_condition(user, :view_issues) do |role, user|
|
||||
unless role.permissions_all_trackers?(:view_issues)
|
||||
@ -64,7 +64,7 @@ class Tracker < ActiveRecord::Base
|
||||
end
|
||||
end
|
||||
joins(:projects).where(condition).distinct
|
||||
}
|
||||
end)
|
||||
|
||||
safe_attributes(
|
||||
'name',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user