lib/ahub/question.rb in ahub-0.8.0 vs lib/ahub/question.rb in ahub-0.9.0
- old
+ new
@@ -31,10 +31,10 @@
super
@author = Ahub::User.new(attrs[:author]) if attrs[:author]
end
def find_answers_by_username(username)
- fetched_answers.find{|answer| answer.author.username == username}
+ fetched_answers.select{|answer| answer.author.username == username}
end
def fetched_answers
@fetched_answers || @answers.map{|answer_id| Ahub::Answer.find(answer_id)}
end