5 ms·
The discard gem for rails has put a lot of thought into this and works pretty well, all things considered. It's not perfect, but I find using a library (either
by lostapathy 6y ago
The discard gem for rails has put a lot of thought into this and works pretty well, all things considered.
It's not perfect, but I find using a library (either directly for inspiration) is often a shortcut to learning about a lot of edge cases from doing your own things.
https://github.com/jhawthorn/discard https://github.com/jhawthorn/discard
- nimchimpsky 6y agoa library ? You literally just need a boolean variable in your datastore of choice.