mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-10-04 09:10:43 -04:00
Create vehicle.rb
This commit is contained in:
1 parent
c5a20c9e7f
commit
8d2351d3f9
1 file changed
+1
-1
@@ -72,7 +72,7 @@ class Vehicle < ActiveRecord::Base
|
||||
# Force Upper Case for VIN numbers
|
||||
def vin=(val)
|
||||
#strip VIN of all illegal chars (for barcode scanner)
|
||||
val.to_s.upcase.gsub(/[^A-HJ-NPR-Za-hj-npr-z\d]+/,"")
|
||||
val = val.to_s.upcase.gsub(/[^A-HJ-NPR-Za-hj-npr-z\d]+/,"")
|
||||
write_attribute(:vin, val)
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user