Error saving model without Ember.DS


I have an Ember project that I had been working on where I could save my model in my route:

        url: config.api.baseURL + 'propzone/' +,
        type: 'PUT',
        contentType: 'application/json',
        data: JSON.stringify(model),
        success: function() {
        error: function(err) {
            alert('Error: ' + err);

This did work fine until I updated Ember and Ember-cli.

Now I’m getting this error message:

Uncaught Error: Assertion Failed: You must use Ember.set() to set the gallery property (of [object Object]) to ``.


Have you taken all the steps mentioned in the upgrade section?


What I did was: update ember and update ember-cli.

Once those were finished I created a new project. I didn’t actually use the old project. I just copied code that I needed into my new project.


I ‘was’ modifying the model in my route like so:

save: function() {
			var self = this;
			var model = this.currentModel;

			// Remove inactive images
			var l =;
			var tempGallery = [];

			while (l--) {
				var g =[l];

				// Change back to http...
				g.src.small = g.src.small.replace(config.https.baseURL, config.cdn.baseURL);
				g.src.medium = g.src.medium.replace(config.https.baseURL, config.cdn.baseURL);
				g.src.large = g.src.large.replace(config.https.baseURL, config.cdn.baseURL);

				if ( === true) {
			} = tempGallery;

… … .

I take it this is not the proper Ember way? I’m using Ember-cli and I do not have any models declared in the models directory. In my route, I have a json call where I read in my model.

#5 = tempGallery;

should be

model.set('gallery', tempGallery)