From 1856d2395d1228e89db7a3b16ff3c5bd3553bf4b Mon Sep 17 00:00:00 2001 From: Fu Matthew Date: Thu, 3 Jan 2013 15:35:14 +0800 Subject: [PATCH] complete page error handler logic --- 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 e591b331..a6535c5f 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -76,7 +76,7 @@ class PagesController < ApplicationController end @item = Item.where(module_app_id: module_app.id,app_frontend_url:params[:app_action]).all_of("tag" => {"$in" => [nil,'']},"category" => { "$in" => [nil,'']}).first unless @item @item = Item.where(module_app_id: module_app.id,app_frontend_url:params[:app_action]).first unless @item - raise PageError,'Missing Frontend Page' + raise PageError,'Missing Frontend Page' if @item.nil? end def save_from_no_lang_for_page