Mozo upgrade progress

This commit is contained in:
2015-07-27 20:40:53 +02:00
parent bd9dfa7c77
commit efae583705
43 changed files with 148 additions and 151 deletions
@@ -1,40 +1,7 @@
#App.ApplicationSerializer = DS.ActiveModelSerializer.extend
#serializeBelongsTo: (record, json, relationship) ->
#console.log "Serialize belongsTo #{record.toString()}"
#key = relationship.key
#belongsTo = Ember.get(record, key)
#key = (if @keyForRelationship then @keyForRelationship(key, "belongsTo") else key)
#if relationship.options.embedded is "always"
#json[key] = belongsTo.serialize()
#else
#@_super record, json, relationship
#serializeHasMany: (record, json, relationship) ->
#console.log "Serialize hasMany #{record.toString()}"
#key = relationship.key
#hasMany = Ember.get(record, key)
#relationshipType = DS.RelationshipChange.determineRelationshipType(record.constructor, relationship)
#if relationship.options.embedded is "always"
#if hasMany and relationshipType is "manyToNone" or relationshipType is "manyToMany" or relationshipType is "manyToOne"
#json[key] = []
#hasMany.forEach (item, index) ->
#json[key].push item.serialize()
#else
#@_super record, json, relationship
App.ApplicationSerializer = DS.ActiveModelSerializer.extend()
App.ApplicationStore = DS.Store.extend
#adapter: DS.RESTAdapter.extend
#host: $data_host
#namespace: 'user'
## user underscored paths
#pathForType: (type)->
#decamelized = Ember.String.decamelize(type)
#Ember.String.pluralize(decamelized)
#headers:
#Accept: 'application/json'
adapter: DS.ActiveModelAdapter.extend
host: $data_host
namespace: 'user'
headers:
"Accept": "application/json, text/javascript; q=0.01"
App.ApplicationAdapter = DS.ActiveModelAdapter.extend
host: $data_host
namespace: 'user'
headers:
"Accept": "application/json, text/javascript; q=0.01"