Links edition
This commit is contained in:
1 parent
d9ba76ebd5
commit
24ae7ed5e3
31 files changed
+184
-98
No files matched your search
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user