Hi there !
I have a habtm relationship between books and keywords. Using the
database, books are added, deleted and modified and keywords also. For a
managing part of the website, I want to have a “find orphan” for the
keywords that are no more linked to any book.
The SQL query could be something like :
FROM keyword AS k
WHERE k.id NOT IN (
SELECT distinct keyword_id
… Is there a “pretty” way to have this using ActiveRecord find method
Or must I use only a find_by_sql ?