I have the Master Model and the Transaction model
class Maestro < ApplicationRecord
has_many :transacciones
end
class Transaccion < ApplicationRecord
end
I need to bring me all the teachers that do not have transactions.
I tried this, but it doesn't work:
Maestro.left_outer_joins(:transacciones)
You are on the right track, you only needed to put the condition that filters the transactions where a master is not associated: