mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-12-29 14:11:00 -05:00
Update vehicles_controller.rb
This commit is contained in:
@@ -91,5 +91,18 @@ class VehiclesController < ApplicationController
|
|||||||
render_404
|
render_404
|
||||||
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