diff options
author | charlieablett <cablett@gitlab.com> | 2019-06-06 20:13:18 +1200 |
---|---|---|
committer | charlieablett <cablett@gitlab.com> | 2019-06-06 22:13:14 +1200 |
commit | 27dd0b8e3609aae92b8e59dd202a999fc1db5a4e (patch) | |
tree | 29728e4b5e439b1f284cb6a4f31d73749e808c25 /app/serializers | |
parent | 7468ed5fd28d08907384787d657d2bbe9af77411 (diff) | |
download | gitlab-ce-27dd0b8e3609aae92b8e59dd202a999fc1db5a4e.tar.gz |
Use serialization for project boards
- Add serializers and Grape::Entity
- Replace to_json
- Add specs
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/board_serializer.rb | 5 | ||||
-rw-r--r-- | app/serializers/board_simple_entity.rb | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/app/serializers/board_serializer.rb b/app/serializers/board_serializer.rb new file mode 100644 index 00000000000..70a4c9ae282 --- /dev/null +++ b/app/serializers/board_serializer.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +class BoardSerializer < BaseSerializer + entity BoardSimpleEntity +end diff --git a/app/serializers/board_simple_entity.rb b/app/serializers/board_simple_entity.rb new file mode 100644 index 00000000000..f297d993e27 --- /dev/null +++ b/app/serializers/board_simple_entity.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +class BoardSimpleEntity < Grape::Entity + expose :id +end |