json.votes answer, answer.votes.count throw 0 is not a symbol nor a string
json.votes answer, answer.votes.count
0 is not a symbol nor a string
Also try json.votes answer, answer.votes.count.to_s throw undefined method '0' for #<Answer:0x00000004699a98>
json.votes answer, answer.votes.count.to_s
undefined method '0' for #<Answer:0x00000004699a98>
Application code
Try json.votes answer.votes.count
json.votes answer.votes.count