0
我有一個表稱爲key_words
至極已一列稱爲name
與搜查trought陣列搜索表
然後,我有另一個表稱爲publications
與被叫key_words
至極它是array
類型的柱。
當我創建發佈保存在key_words
值是這樣的["1", "29", "40"]
(這些是保存在key_words
表IDS)
我如何才能找到一個發佈,如果我在搜索input
computers
在這一刻我有一個search_form_for
由出版物找到title
和description
= search_form_for @search, url: publications_path do |f|
#custom-search-input
.input-group.col-md-12
= f.input :title_or_short_description_or_description_cont, input_html: { class: 'form-control input-sm' }, placeholder: 'Buscar', label: false
感謝您的幫助