1

I'm using Rails 3, and I have the following:

class Artist < ActiveRecord::Base
  has_many :releases
  # more code
end

class Release < ActiveRecord::Base
  belongs_to :artist
  # more codez
end

If I want to select all artists that have NO releases, how would I do this without hardcoding SQL?

spilliton
  • 3,811
  • 5
  • 35
  • 35
  • 2
    Please see http://stackoverflow.com/questions/5319400/want-to-find-records-with-no-associated-records-in-rails-3 – fuhoi Sep 21 '11 at 03:14

0 Answers0