]> source.dussan.org Git - redmine.git/commitdiff
use "do end" instead of {} at ActiveRecord scope lambda of app/models/document.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 10 Nov 2020 11:10:54 +0000 (11:10 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 10 Nov 2020 11:10:54 +0000 (11:10 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@20332 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/document.rb

index 7798e937e6be7e8002cd86f33cd0f27af8750b8c..a1b561b3c4f73bc1401a0aea07b0ab51abe5ab97 100644 (file)
@@ -45,10 +45,10 @@ class Document < ActiveRecord::Base
 
   after_create_commit :send_notification
 
-  scope :visible, lambda {|*args|
+  scope :visible, (lambda do |*args|
     joins(:project).
     where(Project.allowed_to_condition(args.shift || User.current, :view_documents, *args))
-  }
+  end)
 
   safe_attributes 'category_id', 'title', 'description', 'custom_fields', 'custom_field_values'