Browse Source

[FIX]

pull/278/head
viletyy 5 years ago
parent
commit
ef327f2994
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      app/controllers/apply_signatures_controller.rb
  2. +1
    -1
      app/controllers/members_controller.rb

+ 1
- 1
app/controllers/apply_signatures_controller.rb View File

@@ -6,7 +6,7 @@ class ApplySignaturesController < ApplicationController

def index
@apply_signatures = @project.apply_signatures.with_status(status).includes(user: :user_extension)
@apply_signatures = @apply_signatures.joins(:user).where("LOWER(concat(users.lastname, users.firstname, users.login, users.mail)) LIKE ?", "%#{search.split(" ").join('|')}%")
@apply_signatures = @apply_signatures.joins(:user).where("LOWER(concat(users.lastname, users.firstname, users.login, users.mail, users.nickname)) LIKE ?", "%#{search.split(" ").join('|')}%")
@apply_signatures = kaminari_paginate(@apply_signatures)
end



+ 1
- 1
app/controllers/members_controller.rb View File

@@ -18,7 +18,7 @@ class MembersController < ApplicationController
scope = @project.members.includes(:roles, user: :user_extension)
search = params[:search].to_s.downcase
role = params[:role].to_s
scope = scope.joins(:user).where("LOWER(concat(users.lastname, users.firstname, users.login, users.mail)) LIKE ?", "%#{search.split(" ").join('|')}%") if search.present?
scope = scope.joins(:user).where("LOWER(concat(users.lastname, users.firstname, users.login, users.mail, users.nickname)) LIKE ?", "%#{search.split(" ").join('|')}%") if search.present?
scope = scope.joins(:roles).where("roles.name LIKE ?", "%#{role}%") if role.present?

@total_count = scope.size


Loading…
Cancel
Save