Sha256: 1bdb6c2413b2882cf6d26ec4cc58125d49320d0962b93de83d34d2e4034407ec
Contents?: true
Size: 734 Bytes
Versions: 7
Compression:
Stored size: 734 Bytes
Contents
class Admin::PagesController < ApplicationController include TheSortableTreeController::Rebuild def index @pages = Admin::Page.nested_set.select('id, title, content, parent_id').limit(15) end def manage @pages = Admin::Page.nested_set.select('id, title, content, parent_id').limit(15) end def nested_options @pages = Admin::Page.nested_set.select('id, title, content, parent_id').limit(15) end def node_manage @root = Admin::Page.root @pages = @root.self_and_descendants.nested_set.select('id, title, content, parent_id').limit(15) render template: 'admin/pages/manage' end protected def sortable_model Admin::Page end def sortable_collection 'admin_pages' end end
Version data entries
7 entries across 7 versions & 1 rubygems