From 2057aff552c4f1c3bd71835e967440b38c5aca2b Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Thu, 25 Jul 2013 00:47:23 -0700 Subject: [PATCH] Updated --- README.md | 2 +- test/searchkick_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 837c0b6..80189e7 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,7 @@ Choose what data gets indexed. ```ruby class Product < ActiveRecord::Base def _source - as_json(only: [:name, :active]) + as_json(only: [:name, :active], include: {brand: {only: [:country]}}) end end ``` diff --git a/test/searchkick_test.rb b/test/searchkick_test.rb index c969f72..27e37ec 100644 --- a/test/searchkick_test.rb +++ b/test/searchkick_test.rb @@ -18,7 +18,7 @@ class Product < ActiveRecord::Base conversions: true def _source - as_json.merge(conversions: searches.group("query").count) + as_json.merge conversions: searches.group("query").count end end -- libgit2 0.21.0