18 lines
396 B
Ruby
18 lines
396 B
Ruby
|
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
|