diff options
author | James Lopez <james@jameslopez.es> | 2016-11-22 10:33:19 +0100 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-01-17 11:32:54 +0100 |
commit | dc6ea14b0d11a5e73e81c95ef723f0c1af69215b (patch) | |
tree | 4106c4e98865bc93004ae25322d588e64814848f /app/serializers | |
parent | a998276223510ceee67f686dfc3ef536c0252c5a (diff) | |
download | gitlab-ce-dc6ea14b0d11a5e73e81c95ef723f0c1af69215b.tar.gz |
fixed stage entity and added missing stage specs
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/analytics_stage_entity.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/serializers/analytics_stage_entity.rb b/app/serializers/analytics_stage_entity.rb index 72a587c8c1d..d454a4937f4 100644 --- a/app/serializers/analytics_stage_entity.rb +++ b/app/serializers/analytics_stage_entity.rb @@ -2,11 +2,11 @@ class AnalyticsStageEntity < Grape::Entity include EntityDateHelper expose :stage, as: :title do |object| - object[:stage].to_s.capitalize + object.stage.to_s.capitalize end expose :description expose :median, as: :value do |stage| - stage[:median] && !stage[:median].zero? ? distance_of_time_in_words(stage[:median]) : nil + stage.median && !stage.median.zero? ? distance_of_time_in_words(stage.median) : nil end end |