mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-09 01:14:23 -05:00
Update vehicles_controller.rb
This commit is contained in:
@@ -92,4 +92,17 @@ class VehiclesController < ApplicationController
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def only_one_non_zero?( array )
|
||||||
|
found_non_zero = false
|
||||||
|
array.each do |val|
|
||||||
|
if val!=0
|
||||||
|
return false if found_non_zero
|
||||||
|
found_non_zero = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
found_non_zero
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user