Skip to content

Instantly share code, notes, and snippets.

@panakh
Created October 19, 2013 13:31
Show Gist options
  • Save panakh/7055851 to your computer and use it in GitHub Desktop.
Save panakh/7055851 to your computer and use it in GitHub Desktop.
cities: [{name: 'Rome'}],
steps: (function() {
console.log('updating steps');
var data = [];
$.each(this.cities, function(index, city) {
data.push({
name: 'step' + ++index,
title: 'What are you going to do in ' + city.name
})
});
return data;
}).property('cities.@each'),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment