I have two models:
User (id)
Authentication (id, provider,..)
How can I get all users that Do not have a authentication.provider eq to “facebook”?
Thanks
class Authentication < ActiveRecord::Base
belongs_to :user
end
class User < ActiveRecord::Base
has_many :authentications
UPD. Please, refer to Octopus-Paul’s answer for a better solution.
I guess, it would look something like this: