mirror of
https://github.com/rickbarrette/redmine_qbo_vehicles.git
synced 2026-10-04 01:10:43 -04:00
show all vehicles if search is blank
This commit is contained in:
1 parent
44bfb69e22
commit
8503c48944
1 file changed
-1
@@ -47,7 +47,6 @@ class Vehicle < ApplicationRecord
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.search(query)
|
def self.search(query)
|
||||||
return none if query.blank?
|
|
||||||
q = "%#{sanitize_sql_like(query)}%"
|
q = "%#{sanitize_sql_like(query)}%"
|
||||||
where( "vin LIKE :q OR make LIKE :q OR model LIKE :q OR year LIKE :q", q: q)
|
where( "vin LIKE :q OR make LIKE :q OR model LIKE :q OR year LIKE :q", q: q)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in new issue
Block a user