Skip to content

Instantly share code, notes, and snippets.

@mauritslamers
Created October 2, 2008 15:10
Show Gist options
  • Save mauritslamers/14372 to your computer and use it in GitHub Desktop.
Save mauritslamers/14372 to your computer and use it in GitHub Desktop.
_arrangedObjects: [],
arrangedObjects: function( key, value ) {
if ( value ) {
/* adjust for incoming array, store internally, e.g. this._aryToReturn */
var newList = [];
value.each(function(s){
newList.push(s.get('ID_from_the_linking_table'));
});
this.set('_arrangedObjects',newList);
}
// our model:
//else return (this._aryToReturn) ? this._aryToReturn: [];
else return (this._arrangedObjects) ? this._arrangedObjects: [];
}.property()
AdmissionExam.AEExamTeacher = SC.Record.extend(
/** @scope Admissionexam.AEExamTeacher.prototype */ {
// TODO: Add your own code here.
properties: ['id','examId','teacherId'],
teacherIdType: 'OrionFw.Teacher'
}) ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment