ensure return even if not found does not return tru

This commit is contained in:
2026-02-08 20:02:27 -05:00
parent 69a0291ab7
commit 1a1edf675b
+1 -1
View File
@@ -13,7 +13,7 @@ module Cmtool
# General catcher for pages
def show
@page = ::Page.find_by_name_and_locale(params[:name], I18n.locale.to_s)
not_found and return unless @page
return not_found unless @page
@sub_pages = [@page] + @page.children.select{|child| child.in_menu.present? }
template = "pages/#{@page.name}"