diff --git a/app/models/user.rb b/app/models/user.rb index c3ff357961..e8afb3f93e 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -138,7 +138,7 @@ class User < ApplicationRecord if date_range?(term: term) by_date_range(:created_at, term) else - search_pattern = "%#{term}%" + search_pattern = "%#{term}%".squish! # MySQL does not support standard string concatenation and since concat_ws # or concat functions do not exist for sqlite, we have to come up with this # conditional