I have a Fact model, which has_many :votes. Votes also have a user_id field.
I’d like to express the following in a scope for the Fact model: Give me all Facts which have 0 votes with a user_id equal to X.
I’m not quite familiar enough with Arel to understand how I might tackle this. Ideas?
I ended up solving this problem with the following scope: