solved the page part rendering for new empty database

This commit is contained in:
Harry Bomrah 2014-04-21 16:30:27 +08:00
parent 21245a4a86
commit a923745cf1
1 changed files with 1 additions and 1 deletions

View File

@ -241,7 +241,7 @@ class PagesController < ApplicationController
def get_layout
if request[:action] == "edit_view"
page = Page.find(params[:id])
if page.page_id == "" && page.number == 0
if page.page_id == "" || page.page_id == nil
false
else
File.join("../../templates", "#{@key}", '/home/page.html.erb')