For example, let's say I have two models: Parent
and Child
parent.rb
has_many :children
child.rb
belongs_to :parent
I'd like to find all parents where either parent.children.last.gender == "boy"
OR parent.volunteer == "yes"
Thanks in advance.