From 86471441947a413f070c91ad03b889300886e250 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Wed, 3 Feb 2016 21:59:19 -0800 Subject: [PATCH] Better routing example --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7320538..7dee380 100644 --- a/README.md +++ b/README.md @@ -834,11 +834,11 @@ City.search "san", boost_by_distance: {field: :location, origin: {lat: 37, lon: Searchkick supports [Elasticsearch’s routing feature](https://www.elastic.co/blog/customizing-your-document-routing). ```ruby -class Contact < ActiveRecord::Base +class Business < ActiveRecord::Base searchkick routing: true def searchkick_routing - user_id + city_id end end ``` @@ -846,7 +846,7 @@ end Reindex and search with: ```ruby -Contact.search "John", routing: current_user.id +Business.search "ice cream", routing: params[:city_id] ``` ## Inheritance -- libgit2 0.21.0