Browse Source

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
tags/4.2.0
Toshi MARUYAMA 3 years ago
parent
commit
b7d44c8b19
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      app/models/tracker.rb

+ 2
- 2
app/models/tracker.rb View File

@@ -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…
Cancel
Save