How to use senitize_sql_like together with ilike

1

I'm having trouble using senitize_sql_like , along with ilike .

When I use it, the query is not returning the expected value, following implementation used:

scope :brand_name_by_content, -> (brand, sna)
{sna.top_contents.where(sanitize_sql_like("content ilike '%#
{Brand.find(brand[0]).name}%'"))}
    
asked by anonymous 11.09.2018 / 03:53

0 answers