mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 08:54:23 -05:00
Split the VIN
This commit is contained in:
@@ -57,6 +57,7 @@ class VehiclesController < ApplicationController
|
|||||||
def show
|
def show
|
||||||
begin
|
begin
|
||||||
@vehicle = Vehicle.find_by_id(params[:id])
|
@vehicle = Vehicle.find_by_id(params[:id])
|
||||||
|
@vin = @vehicle.vin.scan(/.{1,9}/) if @vehicle.vin
|
||||||
rescue ActiveRecord::RecordNotFound
|
rescue ActiveRecord::RecordNotFound
|
||||||
render_404
|
render_404
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user