Module: Tire::Model::Search::Loader

Defined in:
lib/tire/model/search.rb

Instance Method Summary collapse

Instance Method Details

#load(options = nil) ⇒ Object

Load the “real” model from the database via the corresponding model’s ‘find` method.

Notice that there’s an option to eagerly load models with the ‘:load` option for the search method.



199
200
201
# File 'lib/tire/model/search.rb', line 199

def load(options=nil)
  options ? self.class.find(self.id, options) : self.class.find(self.id)
end