From: Toshi MARUYAMA Date: Tue, 10 Nov 2020 11:10:09 +0000 (+0000) Subject: use "do end" instead of {} at ActiveRecord scope lambda of app/models/news.rb X-Git-Tag: 4.2.0~492 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b09c4decfe5e6eba5715aa73e9f8dd7e3ef12b08;p=redmine.git use "do end" instead of {} at ActiveRecord scope lambda of app/models/news.rb git-svn-id: http://svn.redmine.org/redmine/trunk@20326 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/models/news.rb b/app/models/news.rb index 75656f60a..7c4e4b280 100644 --- a/app/models/news.rb +++ b/app/models/news.rb @@ -39,10 +39,10 @@ class News < ActiveRecord::Base after_create :add_author_as_watcher 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_news, *args)) - } + end) safe_attributes 'title', 'summary', 'description'