I want users to be able to search only their posts and not show the posts created by other users. How exactly would I do that? I'm using Elastic Search
with Searchkick
gem.
I tried this but it is still showing posts from other users:
posts controller
@posts = current_user.posts.search params[:search]
According to searchkick, the following should work:
Maybe you need to add a where clause to only search the post of the user