class User < ActiveRecord::Base
scope :without_tweet, -> { where.not(id: Tweet.select(:user_id).uniq) }
end
Last active
May 12, 2016 08:20
-
-
Save francois-blanchard/20867cc03c7ccbc2eef680e21f514f89 to your computer and use it in GitHub Desktop.
scope for find no relation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment