class Gamefic::Scope::Descendants

The Descendants scope returns an entity’s children and accessible descendants.

Public Instance Methods

matches() click to toggle source
# File lib/gamefic/scope/descendants.rb, line 9
def matches
  context.children.flat_map do |child|
    [child] + subquery_accessible(child)
  end
end