Sha256: 13d38a2f4b14f0f0730e7620d595567c4ef08e2e9d8a9053798fbbcc39113023
Contents?: true
Size: 563 Bytes
Versions: 16
Compression:
Stored size: 563 Bytes
Contents
class Admin::PagesController < Admin::BaseController crudify :page, :conditions => "parent_id IS NULL", :order => "position ASC", :include => [:parts, :slugs, :children, :images] def index if searching? @pages = Page.find_with_index params[:search] else @pages = Page.find_all_by_parent_id(nil, :order => "position ASC") end end def new @page = Page.new RefinerySetting.find_or_set(:default_page_parts, ["body", "side_body"]).each do |page_part| @page.parts << PagePart.new(:title => page_part) end end end
Version data entries
16 entries across 16 versions & 1 rubygems