mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 17:04:23 -05:00
Update vehicles_controller.rb
This commit is contained in:
@@ -18,7 +18,12 @@ class VehiclesController < ApplicationController
|
|||||||
|
|
||||||
# display a list of all vehicles
|
# display a list of all vehicles
|
||||||
def index
|
def index
|
||||||
@vehicles = Vehicle.paginate(:page => params[:page])
|
if params[:search]
|
||||||
|
@vehicles = Customer.search(params[:search]).paginate(:page => params[:page])
|
||||||
|
if only_one_non_zero?(@vehicles)
|
||||||
|
redirect_to @vehicles.first
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# return an HTML form for creating a new vehicle
|
# return an HTML form for creating a new vehicle
|
||||||
|
|||||||
Reference in New Issue
Block a user