There was a question recently in the
#RubyOnRails IRC channel on
freenode: “How can I retrieve all the questions that don’t have
answers?”. This Rails coding example shows the answer.
- Question has_many Answers
- Answer belongs_to Question
Finding Questions with No Answers:
Converse: Finding All Questions that have Answers: