Method: Section#ancestors

Defined in:
app/models/section.rb

#ancestors(options = {}) ⇒ Object



74
75
76
77
# File 'app/models/section.rb', line 74

def ancestors(options={})
  ancs = node ? node.ancestors : []
  options[:include_self] ? ancs + [self] : ancs
end