Change to_i method to to_f method

In order to stop showing 'Not enough data' in cycle analytics view

Remove puts from the file
This commit is contained in:
Małgorzata Ksionek 2019-05-20 23:09:48 +02:00
parent c775e88c0e
commit 2739f41fb3
1 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ class AnalyticsStageEntity < Grape::Entity
expose :description
expose :median, as: :value do |stage|
# median returns a BatchLoader instance which we first have to unwrap by using to_i
!stage.median.to_i.zero? ? distance_of_time_in_words(stage.median) : nil
# median returns a BatchLoader instance which we first have to unwrap by using to_f
!stage.median.to_f.zero? ? distance_of_time_in_words(stage.median) : nil
end
end