I am defining the following scope for my model:
class Entry < ActiveRecord::Base
attr_accessible :email, :published, :result_id, :text, :url
where(['text NOT IN (?)', keywords]) if keywords.any?
This is supposed to return only Entries where the Entry.text doesn’t contain any of the keywords.
entries.not_filtered([“realtor”, “quadplex”, “duplex”, “condo”, “agent”, “broker”])
But somehow this doesn’t exclude the entires which include the keywords in the array.
Is there a way to write that differently? How?