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