Commit 4b392cd2585ae62b5c3c41589371df8e776f51ca

Authored by Andrew Kane
1 parent c2af6eb3

Added load features

Showing 1 changed file with 12 additions and 0 deletions   Show diff stats
README.md
... ... @@ -241,6 +241,18 @@ class Product < ActiveRecord::Base
241 241 end
242 242 ```
243 243  
  244 +Load associations
  245 +
  246 +```ruby
  247 +Product.search "milk", load: {include: [:brand, :stores]}
  248 +```
  249 +
  250 +Do not load records from database
  251 +
  252 +```ruby
  253 +Product.search "milk", load: false
  254 +```
  255 +
244 256 ## Migrating from Tire
245 257  
246 258 1. Change `search` methods to `tire.search` and add index name in existing search calls
... ...