Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's a .size that works for pretty much everything: if the relation isn't loaded then it will do select count(*), but for arrays and loaded associations it does length of an array


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: