Ruby on Rails Tuesday, February 4, 2020

So far, I don't get any results returned

user.rb:

searchkick  word_middle: ['full_name', 'description', 'interests']

 def full_name
  [first_name, last_name].join(' ')
 end
 
 def search_data
   {
   full_name: full_name,
   description: description,
   interests: interests
   }
 end

world_controller.rb
def search
  @terms=params[:terms]
  search = params[:terms].present? ? params[:terms] : nil
    @users = if search
       User.search(search)
    end
end   

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ec49e885-5b99-41f0-ac42-fa820743064e%40googlegroups.com.

No comments:

Post a Comment