mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-04-02 08:21:57 -04:00
Enhance customer search functionality by ordering results and refining search method
This commit is contained in:
@@ -51,7 +51,7 @@ class CustomersController < ApplicationController
|
||||
# display a list of all customers
|
||||
def index
|
||||
if params[:search]
|
||||
@customers = Customer.search(params[:search]).paginate(page: params[:page])
|
||||
@customers = Customer.search(params[:search]).order(:name).paginate(page: params[:page])
|
||||
if only_one_non_zero?(@customers)
|
||||
redirect_to @customers.first
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user