Skip to content

Instantly share code, notes, and snippets.

@mattboldt
Last active August 29, 2015 14:20
Show Gist options
  • Save mattboldt/385134f997944c09e6df to your computer and use it in GitHub Desktop.
Save mattboldt/385134f997944c09e6df to your computer and use it in GitHub Desktop.
# Error in console
Assertion Failed: You must include an `id` for signature in an object passed to `push`
# API
class SignatureInviteSerializer < ActiveModel::Serializer
attributes :id
has_many :signatures
end
class SignatureSerializer < ActiveModel::Serializer
attributes :id
belongs_to :signature_invite
end
# Ember
SignatureInvite = DS.Model.extend
signatures: DS.hasMany('signature')
Signature = DS.Model.extend
signatureInvite: DS.belongsTo('signatureInvite')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment