Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2017-03-17 19:25:17 +0300
committerToon Claes <toon@gitlab.com>2017-03-20 16:39:37 +0300
commit16cca3a0ea7f4b95e99d7b3e8d4953334fa7bec7 (patch)
treed45d895d35ab796b2d5f705bdd3554098c949395 /app/serializers/build_action_entity.rb
parent7a623907528a77187e070c9721469df8bdd00ec8 (diff)
Expose if action is playable in JSON
To avoid a manual build action being played (resulting in a 404), expose `playable?` in the JSON so the frontend can disable/hide the play button if it's not playable.
Diffstat (limited to 'app/serializers/build_action_entity.rb')
-rw-r--r--app/serializers/build_action_entity.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/serializers/build_action_entity.rb b/app/serializers/build_action_entity.rb
index 184f5fd4b52..184b4b7a681 100644
--- a/app/serializers/build_action_entity.rb
+++ b/app/serializers/build_action_entity.rb
@@ -11,4 +11,6 @@ class BuildActionEntity < Grape::Entity
build.project,
build)
end
+
+ expose :playable?, as: :playable
end