pagecontent/app/controllers/page_contents_controller.rb

9 lines
222 B
Ruby

class PageContentsController < OrbitAdminController
def index
params = OrbitHelper.params
page = Page.where(:page_id => params[:page_id]).first
{
"html" => (page.page_contexts.last.content rescue "")
}
end
end