Kosta Pontidas

Joined

60 Experience
0 Lessons Completed
0 Questions Solved

Activity

When I use ["Test"] as my rendered Json it works, however when I try to use data from my posts table, it no longer works. I have rechecked syntax and spelling multiple times and am 100% sure its right exactly following this tutorial. Any Ideas? I've posted in stack overflow, no response, attempted dozens of tutorials with different implementation methods, no use. It's really starting to annoy me because it should be quick and easy like your video. I payed and subscribed to your website hoping you could help me. I also posted this question with my code in the communities section.

I followed your tutorial on elastic search/search kick and implementing jquery autocomplete. It works when I use "Test" as the data, however when I try to use my data from posts table, it doesn't work.

So when my posts controller file's autocomplete action looks like this, it works:

  def autocomplete
       render json: ["Test"]
  end

When I change it to this, and add the changes to the post model file, it stops working -

controller file:

    def autocomplete
         render json: Post.search(params[:term], fields: [{title: :text_start}], limit: 10).map(&:title)
     end

post.rb model file:

     searchkick text_start: [:title]

any help is much appreciated. It's really starting to bug me because it should be quick and easy like your tutorial, I have asked multiple questions on stack overflow, no response and researched for days, spent hours doing several different tutorials with different methods. I subscribed to your website hoping you could help. thank you