Sha256: 7fdb2fbf1b78db5ca9452f4602e84c1f92538c22386485b6637c8c73a8750645
Contents?: true
Size: 568 Bytes
Versions: 26
Compression:
Stored size: 568 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
26 entries across 26 versions & 1 rubygems