I have such model
class Ads::Posting < ActiveRecord:Base
has_one :child, class_name: 'Ads::Posting', foreign_key: :posting_id
belongs_to :parent, class_name: 'Ads::Posting', foreign_key: :posting_id
end
I need to write scope which gets all postings without child. Any ideas how to do that?