[#174,refactor][s]: rename currentRecords to records on Dataset.
This commit is contained in:
@@ -6,13 +6,13 @@ var $el = $('.ex-1');
|
||||
function display(dataset) {
|
||||
// total number of records resulting from latest query
|
||||
$el.append('Total found: ' + dataset.recordCount + '<br />');
|
||||
$el.append('Total returned: ' + dataset.currentRecords.length);
|
||||
$el.append('Total returned: ' + dataset.records.length);
|
||||
|
||||
$el.append('<hr />');
|
||||
|
||||
// dataset.currentRecords is a Backbone Collection of Records that resulted from latest query (hence "current")
|
||||
// dataset.records is a Backbone Collection of Records that resulted from latest query (hence "current")
|
||||
// Get the first record in the list - it returns an instance of the Record object
|
||||
var record = dataset.currentRecords.at(0);
|
||||
var record = dataset.records.at(0);
|
||||
|
||||
// Use the summary helper method which produces proper html
|
||||
// You could also do record.toJSON() to get a hash of the record data
|
||||
|
||||
Reference in New Issue
Block a user