save: function() {
var self = this;
var model = this.currentModel;
// Remove inactive images
var l = model.gallery.length;
var tempGallery = [];
while (l--) {
var g = model.gallery[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 (g.active === true) {
tempGallery.push(g);
}
}
model.gallery = 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.