summaryrefslogtreecommitdiffstats
path: root/app/models/member.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-11-10 11:10:01 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-11-10 11:10:01 +0000
commit13abe5b003a6f20551d6fffbe0b5515411926560 (patch)
tree2287f2e928abef9b2aadb2925b2ce7a255f81849 /app/models/member.rb
parent3a0b7d6a2f03d80abcde82269dd0abe40993fb69 (diff)
downloadredmine-13abe5b003a6f20551d6fffbe0b5515411926560.tar.gz
redmine-13abe5b003a6f20551d6fffbe0b5515411926560.zip
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
Diffstat (limited to 'app/models/member.rb')
-rw-r--r--app/models/member.rb8
1 files 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)