mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-10-04 09:10:43 -04:00
Update vehicle.rb
This commit is contained in:
1 parent
7044377f16
commit
e43635b5d8
1 file changed
+1
-1
@@ -72,7 +72,7 @@ class Vehicle < ActiveRecord::Base
|
|||||||
# Force Upper Case for VIN numbers
|
# Force Upper Case for VIN numbers
|
||||||
def vin=(val)
|
def vin=(val)
|
||||||
|
|
||||||
val = val.to_s.gsub(/[A-HJ-NPR-Za-hj-npr-z\d]/,'')
|
val = val.to_s.gsub(/(?![A-HJ-NPR-Za-hj-npr-z\d])/,'')
|
||||||
|
|
||||||
# The to_s is in case you get nil/non-string
|
# The to_s is in case you get nil/non-string
|
||||||
write_attribute(:vin, val.to_s.upcase)
|
write_attribute(:vin, val.to_s.upcase)
|
||||||
|
|||||||
Reference in new issue
Block a user