Skip to content

Instantly share code, notes, and snippets.

@lsiden
Created December 2, 2009 07:52
Show Gist options
  • Save lsiden/247030 to your computer and use it in GitHub Desktop.
Save lsiden/247030 to your computer and use it in GitHub Desktop.
EccapCalc.ledgerController = function(view, ledger_id) {
/** @class
@extends SC.ArrayController
*/
return SC.ArrayController.create(
SC.CollectionViewDelegate,
/** @scope EccapCalc.ledgerController.prototype */ {
verticalOffset: 0,
ledger: function() {
console.log("ledger_id=" + ledger_id);
//var l = EccapCalc.store.find(EccapCalc.Ledger, ledger_id).refresh();
var l = EccapCalc.store.find(EccapCalc.Ledger, 'foobar').refresh();
console.log("id=" + l.get('id') + ", status=" + l.status());
return EccapCalc.store.find(EccapCalc.Ledger, ledger_id);
}.property().cacheable(),
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment