mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-10-04 17:10:43 -04:00
Update vehicles_controller.rb
This commit is contained in:
1 parent
d9ccffe3d6
commit
e201765f02
1 file changed
+13
@@ -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