Search Multiple models in ruby on rails
<p>I am still a beginner in ruby on rails and I'm trying to create a simple search option for a website that I'm developing. </p>

<p>I have number of models such as Sundries, Curry and Starter. </p>

<p>My search works fine if I have one model but how do I search all models title or name?</p>

<p>I have added following method to each of the models and tried to display results in home page. but no luck!</p>

<pre><code>def self.search(search)
where("LOWER(title) LIKE ?", "%#{search.downcase}%") 
#where("content LIKE ?", "%#{search}%")
end
</code></pre>

<p>Can someone please help me figure this out with an example please?</p>

<p>Thank you.</p>