diff options
author | Hiroyuki Sato <sathiroyuki@gmail.com> | 2017-08-29 07:14:41 +0900 |
---|---|---|
committer | Hiroyuki Sato <sathiroyuki@gmail.com> | 2017-08-29 07:14:41 +0900 |
commit | 87b51c5981db3b1b9831b01ca6e74127d57dc2d9 (patch) | |
tree | 711dcce0d9a49385cae82854ecbbbc13b09b9806 /app/models/user.rb | |
parent | 866aab7f2a92f9929a5c5811d3d3c23c11184b26 (diff) | |
download | gitlab-ce-87b51c5981db3b1b9831b01ca6e74127d57dc2d9.tar.gz |
Move the logic to a concern
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index e5a84ce4080..70787de4b40 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -5,6 +5,7 @@ class User < ActiveRecord::Base include Gitlab::ConfigHelper include Gitlab::CurrentSettings + include Gitlab::SQL::Pattern include Avatarable include Referable include Sortable @@ -303,7 +304,7 @@ class User < ActiveRecord::Base # Returns an ActiveRecord::Relation. def search(query) table = arel_table - pattern = Gitlab::SQL::Pattern.new(query).to_sql + pattern = User.to_pattern(query) order = <<~SQL CASE |