Edit: previous example was incorrect as pointed out by klibertp below. Hopefully they're correct now...
it's not exactly a shining example of good coffeescript, but I think this is equivalent js
MyApp.president = Ember.Object.create({
fullName: function(){
return this.get('firstName') + ' ' + this.get('lastName');
}.property('firstName', 'lastName')
})
I'd probably write it in cs as MyApp.president = Ember.Object.create
fullName: (
-> "#{@get 'firstName'} #{@get 'lastName'}"
).property('firstName', 'lastName')
(ie multi line rather than a single line) but that's very much just stylistic choice. It's also a lousy example of the benefits of cs as the cs version doesn't add any benefit over the plain js one.