Fixed poll officers search
Returning User objects was provoking conflicts retrieving attributes in the views.
This commit is contained in:
@@ -30,7 +30,7 @@ class Admin::Poll::ShiftsController < Admin::Poll::BaseController
|
||||
end
|
||||
|
||||
def search_officers
|
||||
@officers = User.search(params[:search]).order(username: :asc)
|
||||
@officers = User.search(params[:search]).order(username: :asc).select { |o| o.poll_officer? == true }
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in New Issue
Block a user