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

app/models/news.rb

index 75656f60a40efe7e6b0fd25131a7d17b154806b0..7c4e4b2801c515aea70d1ef9d4768a93579d49d9 100644 (file)
@@ -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'