I don't believe the accepted answer gives you exactly what you're looking for, as you want to do a LEFT OUTER JOIN and that answer will give you a INNER JOIN. At least in Rails 5 you can use:
scope :without_photos, left_joins(:photos).where( photos: {id: nil} )
or you can use merge in cases where namespacing will make the where clause cumbersome:
scope :without_photos, left_joins(:photos).merge( Photos.where(id: nil) )