mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-09 09:24:23 -05:00
Update vehicle.rb
This commit is contained in:
@@ -10,8 +10,6 @@
|
|||||||
|
|
||||||
class Vehicle < ActiveRecord::Base
|
class Vehicle < ActiveRecord::Base
|
||||||
|
|
||||||
require "edmunds"
|
|
||||||
|
|
||||||
unloadable
|
unloadable
|
||||||
belongs_to :qbo_customer
|
belongs_to :qbo_customer
|
||||||
|
|
||||||
@@ -28,7 +26,7 @@ class Vehicle < ActiveRecord::Base
|
|||||||
|
|
||||||
def decode_vin
|
def decode_vin
|
||||||
if vin?
|
if vin?
|
||||||
e = Edmunds::VIN.full(vin)
|
e = VIN.full(vin)
|
||||||
vehicle = JSON.parse(e)
|
vehicle = JSON.parse(e)
|
||||||
year = vehicle[:years][:year]
|
year = vehicle[:years][:year]
|
||||||
make = vehicle[:make][:name]
|
make = vehicle[:make][:name]
|
||||||
|
|||||||
Reference in New Issue
Block a user