Rescue nil content for new page
This commit is contained in:
parent
873de8958b
commit
5608c79d42
|
@ -3,7 +3,7 @@ class PageContentsController < OrbitAdminController
|
|||
params = OrbitHelper.params
|
||||
page = Page.where(:page_id => params[:page_id]).first
|
||||
{
|
||||
"html" => page.page_contexts.last.content
|
||||
"html" => (page.page_contexts.last.content rescue "")
|
||||
}
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue