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,6 +18,12 @@ class VehiclesController < ApplicationController
|
|||||||
|
|
||||||
# display a list of all vehicles
|
# display a list of all vehicles
|
||||||
def index
|
def index
|
||||||
|
begin
|
||||||
|
@vehicles = Customers.find_by_id(params[:id]).vehicles
|
||||||
|
rescue ActiveRecord::RecordNotFound
|
||||||
|
render_404
|
||||||
|
end
|
||||||
|
|
||||||
if params[:search]
|
if params[:search]
|
||||||
@vehicles = Vehicle.search(params[:search]).paginate(:page => params[:page])
|
@vehicles = Vehicle.search(params[:search]).paginate(:page => params[:page])
|
||||||
if only_one_non_zero?(@vehicles)
|
if only_one_non_zero?(@vehicles)
|
||||||
|
|||||||
Reference in New Issue
Block a user