/username.json error for a specific user on a topic


(Ivan) #1

We have developed a topic thread sidebar that displays topic contributors, suggested discussions etc. For one of our particular threads (Craigslist Rental Scam - Renting - Two by Fore: Advice, Discussions & Stories), a new user (darrell_cray) doesn’t appear under ‘Question Contributors’.

Doing /topicid.json and then extracting all usernames:

Doing the AJAX in console for this particular user:

So for some reason, it’s working for both myself and Margaret, but not Darrell, as seen by the error message. I’ve checked the Rails console and he is in the database. Would anyone know why this could be?


(Ivan) #2

I think I figured it out… All more established users have an attribute called array, which I was traversing initially. So I should just do data.user.name and NOT data.users[0]....