There was an error while loading. Please reload this page.
1 parent d2b7e4e commit 7198567Copy full SHA for 7198567
lib/cms/concerns/can_be_addressable.rb
@@ -224,8 +224,7 @@ def page_title
224
#
225
def ancestors(options={})
226
return [] unless node
227
- ancestor_nodes = node.ancestors
228
- ancestors = ancestor_nodes.collect { |node| node.node }
+ ancestors = node.ancestors.includes(:node).collect(&:node)
229
ancestors << self if options[:include_self]
230
ancestors
231
end
0 commit comments