Hacker News new | ask | show | jobs
by nahname 4862 days ago
Neither is very palatable.

MyApp.president = Ember.Object.create(({fullName: (function() {return this.get('firstName')+' '+this.get('lastName');}).property('firstName', 'lastName')}));

MyApp.president = Ember.Object.create fullName: (-> @get('firstName') + ' ' + @get('lastName') ).property('firstName', 'lastName')

1 comments

At least I can look at the first one and it's more obvious to me what it does. The braces help.