Class: ActsAsOrderedTree::Relation::Preloaded
- Defined in:
- lib/acts_as_ordered_tree/relation/preloaded.rb
Overview
Common relation, but with already loaded records
Constant Summary
Constants inherited from Base
Instance Method Summary collapse
-
#records(records) ⇒ Object
Set loaded records to
records
.
Methods inherited from Base
Constructor Details
This class inherits a constructor from ActsAsOrderedTree::Relation::Base
Instance Method Details
#records(records) ⇒ Object
Set loaded records to records
8 9 10 11 12 13 |
# File 'lib/acts_as_ordered_tree/relation/preloaded.rb', line 8 def records(records) relation = clone relation.instance_variable_set :@records, records relation.instance_variable_set :@loaded, true relation end |