:conditions = ['body LIKE?' AND 'title LIKE?', %#{search}%]
Try fixing the condition clause to:
:conditions = ['body LIKE ? AND title LIKE ?', %#{search}%, %#
{search}% ]
You are passing an array containing the SQL WHERE clause in a
template. Each '?' is a placeholder for the
g_f wrote:
:conditions = ['body LIKE?' AND 'title LIKE?', %#{search}%]
Try fixing the condition clause to:
:conditions = ['body LIKE ? AND title LIKE ?', %#{search}%, %#
{search}% ]
You are passing an array containing the SQL WHERE clause in a
template. Each '?' is a placeholder
2 matches
Mail list logo