Comment

Comment by pjm331

As a fellow AR lover the only things that consistently bug me are when it does things like:

- .count on a collection calls SQL every time, but there is also a .count method for arrays - which means you need to remember to use .length if you just want to count the objects loaded into memory

- ‘build’ methods for an association usually only initialize a record in memory, but with has_one associations it deletes any record that already exists

So basically when it’s not clear about the fact that it’s doing database things.

parent pjm331 7 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton