Is there any way to use EXISTS with ActiveRecord besides find_by_sql?
I would like to find all the records without an association in a one-to-many relationship.
SELECT DISTINCT store_type FROM stores WHERE NOT EXISTS (SELECT * FROM cities_stores WHERE cities_stores.store_type = stores.store_type)
activerecord
jspooner
source share