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.

Methods

new   preload   record_class   reselect  

Public Class methods

Creates a new Array to hold objects of type ‘record_class’. Additional arguments will be passed to Array#new.

Public Instance methods

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 the record class of the elements of the array.

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.

[Validate]