From 13abe5b003a6f20551d6fffbe0b5515411926560 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 10 Nov 2020 11:10:01 +0000 Subject: [PATCH] use "do end" instead of {} at ActiveRecord scope lambda of app/models/member.rb git-svn-id: http://svn.redmine.org/redmine/trunk@20325 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/member.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/member.rb b/app/models/member.rb index f5d77e87d..c04d139c9 100644 --- a/app/models/member.rb +++ b/app/models/member.rb @@ -33,15 +33,15 @@ class Member < ActiveRecord::Base scope :active, lambda { joins(:principal).where(:users => {:status => Principal::STATUS_ACTIVE})} # Sort by first role and principal - scope :sorted, lambda { + scope :sorted, (lambda do includes(:member_roles, :roles, :principal). reorder("#{Role.table_name}.position"). order(Principal.fields_for_order_statement) - } - scope :sorted_by_project, lambda { + end) + scope :sorted_by_project, (lambda do includes(:project). reorder("#{Project.table_name}.lft") - } + end) alias :base_reload :reload def reload(*args) -- 2.39.5