summaryrefslogtreecommitdiffstats
path: root/app/models/principal.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-11-18 16:16:15 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-11-18 16:16:15 +0000
commit046c0c472913e86fca4793177e2f11c09422c37d (patch)
tree6f7e3be88f2fd7a5c809bc1fbf1a52fce4249b52 /app/models/principal.rb
parent675ec6f929dd7539f7dbc69b2502ef4fbbebcc57 (diff)
downloadredmine-046c0c472913e86fca4793177e2f11c09422c37d.tar.gz
redmine-046c0c472913e86fca4793177e2f11c09422c37d.zip
remove spaces inside {} of app/models/principal.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20423 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/principal.rb')
-rw-r--r--app/models/principal.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/principal.rb b/app/models/principal.rb
index 21962c6dc..606e9bb24 100644
--- a/app/models/principal.rb
+++ b/app/models/principal.rb
@@ -39,7 +39,7 @@ class Principal < ActiveRecord::Base
validate :validate_status
# Groups and active users
- scope :active, lambda { where(:status => STATUS_ACTIVE) }
+ scope :active, lambda {where(:status => STATUS_ACTIVE)}
scope :visible, (lambda do |*args|
user = args.first || User.current
@@ -76,7 +76,7 @@ class Principal < ActiveRecord::Base
sql << " OR #{table_name}.id IN (SELECT user_id FROM #{EmailAddress.table_name} WHERE LOWER(address) LIKE LOWER(:p))"
params = {:p => pattern}
- tokens = q.split(/\s+/).reject(&:blank?).map { |token| "%#{token}%" }
+ tokens = q.split(/\s+/).reject(&:blank?).map {|token| "%#{token}%"}
if tokens.present?
sql << ' OR ('
sql << tokens.map.with_index do |token, index|
@@ -111,10 +111,10 @@ class Principal < ActiveRecord::Base
where("#{Principal.table_name}.id NOT IN (SELECT DISTINCT user_id FROM #{Member.table_name} WHERE project_id IN (?))", ids)
end
end)
- scope :sorted, lambda { order(*Principal.fields_for_order_statement)}
+ scope :sorted, lambda {order(*Principal.fields_for_order_statement)}
# Principals that can be added as watchers
- scope :assignable_watchers, lambda { active.visible.where(:type => ['User', 'Group']) }
+ scope :assignable_watchers, lambda {active.visible.where(:type => ['User', 'Group'])}
before_create :set_default_empty_values
before_destroy :nullify_projects_default_assigned_to