Skip to content

Instantly share code, notes, and snippets.

@elliottkember
Last active December 23, 2015 11:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elliottkember/6624829 to your computer and use it in GitHub Desktop.
Save elliottkember/6624829 to your computer and use it in GitHub Desktop.
App.ApplicationSerializer = DS.ActiveModelSerializer.extend
serialize: (record, options) ->
json = @_super record, options
record.eachAttribute (name, attribute) ->
if attribute.options.readOnly
delete json.name
json
App.Object = Ember.Model.extend
name: DS.attr 'string', readOnly: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment