From 6f5c23c6e3094704226512b318b2598e5d2c64ed Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 10 Nov 2020 11:10:54 +0000 Subject: [PATCH] use "do end" instead of {} at ActiveRecord scope lambda of app/models/document.rb git-svn-id: http://svn.redmine.org/redmine/trunk@20332 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/document.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/document.rb b/app/models/document.rb index 7798e937e..a1b561b3c 100644 --- a/app/models/document.rb +++ b/app/models/document.rb @@ -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' -- 2.39.5