mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 17:04:23 -05:00
Added comments to clearify methods
This commit is contained in:
@@ -26,6 +26,7 @@ class VehiclesController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
# search for a vehicle by vin
|
||||
if params[:search]
|
||||
@vehicles = Vehicle.search(params[:search]).paginate(:page => params[:page])
|
||||
if only_one_non_zero?(@vehicles)
|
||||
@@ -103,6 +104,8 @@ class VehiclesController < ApplicationController
|
||||
|
||||
private
|
||||
|
||||
# checks to see if there is only one item in an array
|
||||
# @return true if array only has one item
|
||||
def only_one_non_zero?( array )
|
||||
found_non_zero = false
|
||||
array.each do |val|
|
||||
|
||||
Reference in New Issue
Block a user