Update vehicle.rb

This commit is contained in:
2019-11-11 10:10:23 -05:00
committed by GitHub
parent fee710d717
commit aa45338e36

View File

@@ -60,13 +60,13 @@ class Vehicle < ActiveRecord::Base
return @details.doors if @details return @details.doors if @details
end end
# Force Upper Case for VIN numbers # Force Upper Case for make numbers
def make=(val) def make=(val)
# The to_s is in case you get nil/non-string # The to_s is in case you get nil/non-string
write_attribute(:make, val.to_s.titleize) write_attribute(:make, val.to_s.titleize)
end end
# Force Upper Case for VIN numbers # Force Upper Case for model numbers
def model=(val) def model=(val)
# The to_s is in case you get nil/non-string # The to_s is in case you get nil/non-string
write_attribute(:model, val.to_s.titleize) write_attribute(:model, val.to_s.titleize)