Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- q1 = Question.find(2323, :include => :responses)
- puts q1.responses[1].inspect #=> #<Response id: 33871, created_at: "2008-02-29 19:05:24", question_id: 2323, user_id: 7>
- puts q1.responses[1].user_id #=> nil
- puts q1.responses.collect { |response| response.user_id }
- # => output: for some reason the collect statement shows user_id for every response to be nil even though I know most of them are not!
- nil
- nil
- nil
- nil
- nil
- nil
- nil
- nil
- nil
- nil
- ...
Add Comment
Please, Sign In to add comment