1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-19 15:01:14 +00:00

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
This commit is contained in:
Toshi MARUYAMA 2020-11-10 11:10:09 +00:00
parent 13abe5b003
commit b09c4decfe

View File

@ -39,10 +39,10 @@ class News < ActiveRecord::Base
after_create :add_author_as_watcher after_create :add_author_as_watcher
after_create_commit :send_notification after_create_commit :send_notification
scope :visible, lambda {|*args| scope :visible, (lambda do |*args|
joins(:project). joins(:project).
where(Project.allowed_to_condition(args.shift || User.current, :view_news, *args)) where(Project.allowed_to_condition(args.shift || User.current, :view_news, *args))
} end)
safe_attributes 'title', 'summary', 'description' safe_attributes 'title', 'summary', 'description'