- can't convert Question into Integer error In a rails 3 app
- current_user.id is an integer
- Questions table - id is an integer
- Answers table - question_id and user_id are integers
- @questions.each do |q|
- ans[q] = Answer.where("question_id = ? AND user_id = ?", q.id, current_user.id ) # this is line 27
- end
- ans[q.id] = Answer.where("question_id = ? AND user_id = ?", q.id, current_user.id )