mirror of
https://github.com/rickbarrette/redmine_qbo_vehicles.git
synced 2026-04-02 07:01:59 -04:00
show all vehicles if search is blank
This commit is contained in:
@@ -47,7 +47,6 @@ class Vehicle < ApplicationRecord
|
||||
end
|
||||
|
||||
def self.search(query)
|
||||
return none if query.blank?
|
||||
q = "%#{sanitize_sql_like(query)}%"
|
||||
where( "vin LIKE :q OR make LIKE :q OR model LIKE :q OR year LIKE :q", q: q)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user