Fix bus for pages and page content
This commit is contained in:
1 parent
f8d1d7242d
commit
8f531a6fe5
4 files changed
+4
-4
No files matched your search
@@ -61,7 +61,7 @@ class Admin::PagesController < ApplicationController
|
||||
def update
|
||||
@item = Page.find(params[:id])
|
||||
|
||||
if @item.module_app.key == 'page_content' && @item.page_contexts.blank?
|
||||
if @item.module_app && @item.module_app.key == 'page_content' && @item.page_contexts.blank?
|
||||
@item.page_contexts.build(:create_user_id => current_user.id, :update_user_id => current_user.id )
|
||||
end
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ class PagesController < ApplicationController
|
||||
def show
|
||||
#begin
|
||||
@item = Item.first(:conditions => {:full_name => params[:page_name]})
|
||||
if @item.is_published
|
||||
if @item && @item.is_published
|
||||
case @item._type
|
||||
when 'Page'
|
||||
render_page(params[:id])
|
||||
|
||||
Reference in new issue
Block a user