Browse Source

fix merge from develop

pull/313/head
yystopf 4 years ago
parent
commit
8a7dc75907
2 changed files with 2 additions and 1 deletions
  1. +1
    -0
      app/models/message_template/custom_tip.rb
  2. +1
    -1
      app/models/user.rb

+ 1
- 0
app/models/message_template/custom_tip.rb View File

@@ -61,6 +61,7 @@ class MessageTemplate::CustomTip < MessageTemplate
end
title.gsub!('{platform}', PLATFORM)
content.gsub!('{platform}', PLATFORM)
content.gsub!('{baseurl}', base_url)

return title, content
rescue => e


+ 1
- 1
app/models/user.rb View File

@@ -181,7 +181,7 @@ class User < Owner
scope :active, lambda { where(status: [STATUS_ACTIVE, STATUS_EDIT_INFO]) }
scope :like, lambda { |keywords|
sql = "CONCAT(lastname, firstname) LIKE :search OR nickname LIKE :search OR login LIKE :search OR mail LIKE :search OR nickname LIKE :search"
where(sql, :search => "%#{keywords.split(" ").join('|')}%") unless keywords.blank?
where(sql, :search => "%#{keywords.strip}%") unless keywords.blank?
}

scope :simple_select, -> {select(:id, :login, :lastname,:firstname, :nickname, :gitea_uid, :type)}


Loading…
Cancel
Save