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

app/models/member.rb

index f5d77e87dc07571c5b31fbaadb90caad0ed4f57c..c04d139c951e187a5b105e6d787efc9f4b29bcaf 100644 (file)
@@ -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)