Update vehicle.rb

This commit is contained in:
2017-06-13 11:44:46 -04:00
committed by GitHub
parent 2b8c4b4d4d
commit 7ca3315ce5

View File

@@ -75,7 +75,7 @@ class Vehicle < ActiveRecord::Base
val = val.to_s.gsub!(/[^[A-HJ-NPR-Za-hj-npr-z\d]{8}]/,'')
# The to_s is in case you get nil/non-string
write_attribute(:vin, val.upcase)
write_attribute(:vin, val.to_s.upcase)
end
# search for a vin