src code

class method ActiveRecord.Model.resultSetFromArray

ActiveRecord.Model.resultSetFromArray(result_set[,find_params]) → Array

Extends a vanilla array with ActiveRecord.ResultSet methods allowing for the construction of custom result set objects from arrays where result sets are expected. This will modify the array that is passed in and return the same array object.

var one = Comment.find(1);
var two = Comment.find(2);
var result_set = Comment.resultSetFromArray([one,two]);