From 31beca84b30eea72896007349a4213e743700f32 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 10 Nov 2020 11:10:16 +0000 Subject: use "do end" instead of {} at ActiveRecord scope lambda of app/models/message.rb git-svn-id: http://svn.redmine.org/redmine/trunk@20327 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/message.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/models/message.rb') diff --git a/app/models/message.rb b/app/models/message.rb index bf2c13eab..5e9caddaf 100644 --- a/app/models/message.rb +++ b/app/models/message.rb @@ -60,10 +60,10 @@ class Message < ActiveRecord::Base after_destroy :reset_counters! after_create_commit :send_notification - scope :visible, lambda {|*args| + scope :visible, (lambda do |*args| joins(:board => :project). where(Project.allowed_to_condition(args.shift || User.current, :view_messages, *args)) - } + end) safe_attributes 'subject', 'content' safe_attributes( -- cgit v1.2.3