/ Published in: Rails
Instead of simply adding a list of things at the end of the array, you can also pass in a hash and change the question marks to actual named replacements. This can help you keep the order of your arguments straight.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Event.find( :all, :conditions => [ "title like :search or description like :search", {:search => "%Tiki%"}] )