Links edition

This commit is contained in:
chris2tof committed 2011-05-13 09:08:42 +08:00
1 parent d9ba76ebd5
commit 24ae7ed5e3
31 files changed
+184 -98

No files matched your search

+4 -2
View File
@@ -6,12 +6,14 @@ class Admin::ItemsController < ApplicationController
before_filter :find_parent_item
before_filter :find_snippets, :only => :index
before_filter :is_admin?
before_filter :set_current_item
def index
if params[:item_id]
@page = Item.find(params[:item_id])
@item = Item.find(params[:item_id])
else
@page = Item.first(:conditions => {:parent_id => nil})
@item = Item.first(:conditions => {:parent_id => nil})
@page = @item
end
end