Skip to content

Instantly share code, notes, and snippets.

@jsmestad
Created September 24, 2014 20:20
Show Gist options
  • Save jsmestad/ac3ac5ce33349845a56d to your computer and use it in GitHub Desktop.
Save jsmestad/ac3ac5ce33349845a56d to your computer and use it in GitHub Desktop.
class DomainSerializer
attributes :id, :name
# Override publicly-exposed ID to actually be GUID
def id
self.guid
end
end
class RecordSerializer
attributes :id, :domain_id
def id
self.guid
end
def domain_id
self.domain.guid
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment