class Admin::PageTypesController < ApplicationController
  def index
    @page = Page.find(params[:page_id])
    @options = Page.descendants.sort_by(&:name)
    render :layout => false
  end
end
class Admin::PageTypesController < ApplicationController
  def index
    @page = Page.find(params[:page_id])
    @options = page_types
    render :layout => false
  end

  private

    def page_types
      Page.descendants.sort_by(&:name)
    end
end
Move page subclass detection into a separate method so extensions can hook it
Move page subclass detection into a separate method so extensions can hook it
