I have 2 tables:
1. Post table (:id, :content)
2. Comment table (:id, :post_id, :content)
I'm using this code:
@result = Comment.where("content LIKE :query", query: "%#{@keyword}%")
@result
has more dupplicated posts, how can I select unique collection by DISTINCT :post_id
Thanks for your help!