From 7782627286ac989c5b47e833da3518fa38225c5e Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Fri, 31 Mar 2017 16:07:09 -0400 Subject: [PATCH] Split the VIN --- app/controllers/vehicles_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/vehicles_controller.rb b/app/controllers/vehicles_controller.rb index cd7ad16..9b52091 100644 --- a/app/controllers/vehicles_controller.rb +++ b/app/controllers/vehicles_controller.rb @@ -57,6 +57,7 @@ class VehiclesController < ApplicationController def show begin @vehicle = Vehicle.find_by_id(params[:id]) + @vin = @vehicle.vin.scan(/.{1,9}/) if @vehicle.vin rescue ActiveRecord::RecordNotFound render_404 end