mercredi 13 mars 2019

Can not return desired result from database

I am making a simple query in Rails but I can not seem to get the desired result, I god:

<%= User.select(id: @list.user_id).pluck(:username) %>

and it is working fine, but I get

["User1"] instead of User1

I tried .to_s but it did not work, thank you in advance!

Aucun commentaire:

Enregistrer un commentaire