0

What is returned when I do a search with the Tire gem in Rails (using Active Record integration)? Is the actual models returned or is it some generic object? I don't understand what I get back.

LuckyLuke
  • 47,771
  • 85
  • 270
  • 434

2 Answers2

1

It is an object of collection class. you can check this link https://github.com/karmi/tire/blob/master/lib/tire/results/collection.rb

Mukesh
  • 1,257
  • 11
  • 27
-1

Please read the Tire's README carefully, namely the parts about the :load option for model search methods.

For background, search Github issues for Item, and see unit/integration tests for Tire::Results::Collection and Tire::Results::Item.

karmi
  • 14,059
  • 3
  • 33
  • 41