Commit 2057aff552c4f1c3bd71835e967440b38c5aca2b

Authored by Andrew Kane
1 parent b2472aea

Updated

Showing 2 changed files with 2 additions and 2 deletions   Show diff stats
README.md
... ... @@ -131,7 +131,7 @@ Choose what data gets indexed.
131 131 ```ruby
132 132 class Product < ActiveRecord::Base
133 133 def _source
134   - as_json(only: [:name, :active])
  134 + as_json(only: [:name, :active], include: {brand: {only: [:country]}})
135 135 end
136 136 end
137 137 ```
... ...
test/searchkick_test.rb
... ... @@ -18,7 +18,7 @@ class Product &lt; ActiveRecord::Base
18 18 conversions: true
19 19  
20 20 def _source
21   - as_json.merge(conversions: searches.group("query").count)
  21 + as_json.merge conversions: searches.group("query").count
22 22 end
23 23 end
24 24  
... ...