assigns: fix search among the unassigned instructeurs

This was broken since moving the email out of the Instructeur column.
This commit is contained in:
Pierre de La Morinerie 2019-11-06 11:59:15 +01:00
parent b2b577d4a9
commit 0eeac59ecd
2 changed files with 31 additions and 5 deletions

View file

@ -18,7 +18,7 @@ class Admin::AssignsController < AdminController
not_assign_scope = current_administrateur.instructeurs.where.not(id: assign_scope.ids)
if params[:filter]
not_assign_scope = not_assign_scope.where("email LIKE ?", "%#{params[:filter]}%")
not_assign_scope = not_assign_scope.where('users.email LIKE ?', "%#{params[:filter]}%")
end
@instructeurs_not_assign = smart_listing_create :instructeurs_not_assign,