First draft of API to add items to a collection (#37222)
This commit is contained in:
1 parent
1e67567d8f
commit
3cc4b59b41
5 files changed
+106
-2
No files matched your search
@@ -3,7 +3,11 @@
|
||||
class REST::CollectionItemSerializer < ActiveModel::Serializer
|
||||
delegate :accepted?, to: :object
|
||||
|
||||
attributes :position, :state
|
||||
attributes :id, :position, :state
|
||||
|
||||
belongs_to :account, serializer: REST::AccountSerializer, if: :accepted?
|
||||
|
||||
def id
|
||||
object.id.to_s
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user