Check if record does NOT exist in Rails (from array of ids)?

I can do this to check if a record(s) exists (say id "1" exists, but "2" and "3" don't):

Model.exists?(:id => [1, 2, 3]) #=> true

How do I do the opposite, so:

Model.not_exists?(:id => [1, 2, 3]) #=> true
18
задан Lance Pollard 1 December 2010 в 16:28
поделиться