| Class | FlexiRecord::RecordArray |
| In: |
lib/flexirecord.rb
|
| Parent: | Array |
Sub-class of Array to provide special methods to be used on multiple database records at once.
Creates a new Array to hold objects of type ‘record_class’. Additional arguments will be passed to Array#new.
Preloads the attribute named ‘attr’ in each record of the RecordArray, without doing one SQL query for each record. Can return another RecordArray, which can be used for the next level of preloading.
Returns a RecordArray of re-selected objects. This can be used to re-sort records by the database, to do further filtering, or to reload all records at once.