lib/finapps/rest/documents_orders.rb in finapps-5.4.1 vs lib/finapps/rest/documents_orders.rb in finapps-6.0.0

- old
+ new

@@ -73,31 +73,31 @@ def search_query(term) return {} unless term query = with_space_search(term).concat(name_search(term)) - {"$or": query} + {'$or': query} end def name_search(term) search_arr = [] if /\s/.match?(term) term.split.each do |t| - search_arr.append("applicant.first_name": t) - search_arr.append("applicant.last_name": t) + search_arr.append('applicant.first_name': t) + search_arr.append('applicant.last_name': t) end end search_arr end def with_space_search(term) - [{"applicant.email": term}, - {"applicant.first_name": term}, - {"applicant.last_name": term}, - {"applicant.external_id": term}, + [{'applicant.email': term}, + {'applicant.first_name': term}, + {'applicant.last_name': term}, + {'applicant.external_id': term}, { reference_no: { - "$regex": "^#{term}", "$options": 'i' + '$regex': "^#{term}", '$options': 'i' } }] end def tag_query(tag)