Add Item, Page, Component, Link inheritanced models

This commit is contained in:
Wen-Tien Chang committed 2010-01-14 18:30:53 +08:00
1 parent cd21cadfe7
commit e1440a79d8
38 files changed
+417 -175

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
class Admin::ItemsController < ApplicationController
layout "admin"
before_filter :find_parent_item
before_filter :find_snippets, :only => :index
def index
@items = Item.all( :conditions => { :parent_item_name => @parent_item.name } )
end
protected
def find_snippets
@snippets = Snippet.all( :conditions => { :parent_item_name => @parent_item.name } )
end
end