mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 17:04:23 -05:00
Update vehicle.rb
This commit is contained in:
@@ -75,6 +75,11 @@ class Vehicle < ActiveRecord::Base
|
|||||||
write_attribute(:vin, val.to_s.upcase)
|
write_attribute(:vin, val.to_s.upcase)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# search for a vin
|
||||||
|
def self.search(search)
|
||||||
|
where("vin LIKE ?", "%#{search}%")
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
# init method to pull JSON details from Edmunds
|
# init method to pull JSON details from Edmunds
|
||||||
@@ -122,8 +127,4 @@ class Vehicle < ActiveRecord::Base
|
|||||||
return v.slice(0,8) + v.slice(9,11)
|
return v.slice(0,8) + v.slice(9,11)
|
||||||
end
|
end
|
||||||
|
|
||||||
# search for a vin
|
|
||||||
def self.search(search)
|
|
||||||
where("vin LIKE ?", "%#{search}%")
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user