From 26124e91383b3883c49192b25bb2ba26b286a36e Mon Sep 17 00:00:00 2001 From: Manson Wang Date: Thu, 21 Nov 2013 14:33:16 +0800 Subject: [PATCH] Fix 'Missing Frontend Page' when page is a subpage --- app/controllers/pages_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index cd02d967..df2f0491 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -196,7 +196,7 @@ class PagesController < ApplicationController end end - @item = Item.root.children.where(:module_app_id => module_app.id).first unless @item + @item = Item.where(:module_app_id => module_app.id).first unless @item end raise PageError,'Missing Frontend Page' if @item.nil? end