lib/finapps/rest/operators.rb in finapps-2.3.7 vs lib/finapps/rest/operators.rb in finapps-3.0.1
- old
+ new
@@ -58,10 +58,10 @@
filter.merge!(role_query(params[:role])) if params[:role]
filter
end
def search_query(term)
- {"last_name": {"$regex": term, "$options": 'i'}}
+ {"last_name": term}
end
def role_query(role)
role.is_a?(Array) ? {"role": {"$in": role.map(&:to_i)}} : {"role": role.to_i}
end