app/helpers/admin/node_helper.rb in trusty-cms-4.2.1 vs app/helpers/admin/node_helper.rb in trusty-cms-4.2.2
- old
+ new
@@ -8,10 +8,10 @@
def render_node(page, index, parent_index = nil, simple = false)
@current_node = prepare_page(page)
@rendered_html += (render partial: 'admin/pages/node',
locals: { level: index, index: index, parent_index: parent_index,
- page: page, simple: simple, branch: (page.children.count > 0) })
+ page: page, simple: simple, branch: (page.children.count.positive?) })
index
end
def prepare_page(page)
page.extend MenuRenderer