TIL how to select values from one column without `nil` in Rails
Published on January 23, 2022
Page.where.not(custom_domain: nil).pluck(:custom_domain)
---------------------------------------
Page.pluck(:custom_domain)![]()
screenshot from rails console
`.pluck` picks values but includes `nil` as well. So we can use `.compact`
Page.pluck(:custom_domain).compact
