or this is better : User.where(email:'[email protected]').get(:id) Le vendredi 17 juin 2022 à 20:03:18 UTC+2, Thiebo a écrit :
> Hi! > > When I need only one field from a row, I currently do this: > > userid = User.where(email: "[email protected]").select(:id).first[:id] > > it works, but it this the best way of doing that? > > Many thanks > > Thiebo > -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sequel-talk/5e61f389-bcd5-4359-a338-d186ba396f25n%40googlegroups.com.
