1
I’m having trouble using the senitize_sql_like, along with the ilike.
When I use it, the query is not returning the expected value, it follows the implementation used:
scope :brand_name_by_content, -> (brand, sna)
{sna.top_contents.where(sanitize_sql_like("content ilike '%#
{Brand.find(brand[0]).name}%'"))}
manages to include what it is returning, what you expected it to return and the structure of your db? enjoy and tour!
– Daniel
to include more data, change your question by clicking on edit.
– Daniel
I was wrong about the Sanitize call.
– Lucas Alvine