User `zero?` instead of comparing value with zero

parent 27a2c592
...@@ -18,7 +18,7 @@ class GeoNodePresenter < Gitlab::View::Presenter::Delegated ...@@ -18,7 +18,7 @@ class GeoNodePresenter < Gitlab::View::Presenter::Delegated
end end
def repositories_synced_in_percentage def repositories_synced_in_percentage
return 0 if repositories === 0 return 0 if repositories.zero?
(repositories_synced.to_f / repositories.to_f) * 100.0 (repositories_synced.to_f / repositories.to_f) * 100.0
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment