TIL how to select values from one column without `nil` in Rails

by @rinas

Update:

There is a better way to do this as discussed here in Twitter

Page.where.not(custom_domain: nil).pluck(:custom_domain)


---------------------------------------

Page.pluck(:custom_domain)
Screenshot of rails console

`.pluck` picks values but includes `nil` as well. So we can use `.compact`


Page.pluck(:custom_domain).compact
Screenshot of rails console

Regarding privacy concerns, it's simple - we don't sell your data. In fact, we try to use privacy-focused software/services like Fathom Analytics whenever we use any third-party services.