-
-
Save radar/14cf3e956fda5a80088634a4b4bf30db to your computer and use it in GitHub Desktop.
does self do an inner join on i
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Parent < ActiveRecord::Base | |
has_many :children | |
#Question: Does method below perform a join in children and match only children belonging to a specific parent? | |
def has_active_children | |
children.exists?(status: "active") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment