mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 17:04:23 -05:00
Jump to customer is there is only one result
This commit is contained in:
@@ -20,6 +20,9 @@ class CustomersController < ApplicationController
|
||||
def index
|
||||
if params[:search]
|
||||
@customers = Customer.search(params[:search]).paginate(:page => params[:page])
|
||||
if @customers.count = 1
|
||||
redirect_to @customers.first
|
||||
end
|
||||
else
|
||||
@customers = Customer.paginate(:page => params[:page])
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user