Add Item list interface, but acts_as_list can not used
This commit is contained in:
1 parent
f9b1618ac7
commit
93169b1098
7 files changed
+30
-14
No files matched your search
@@ -9,6 +9,18 @@ class Admin::ItemsController < ApplicationController
|
||||
@items.unshift Item.find_by_name("root") if @parent_item.name == 'root'
|
||||
end
|
||||
|
||||
def up
|
||||
@item = Item.find(params[:id])
|
||||
@item.move_higher
|
||||
redirect_to admin_items_url( :parent_name => @item.parent_name )
|
||||
end
|
||||
|
||||
def down
|
||||
@item = Item.find(params[:id])
|
||||
@item.move_lower
|
||||
redirect_to admin_items_url( :parent_name => @item.parent_name )
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def find_snippets
|
||||
|
||||
Reference in new issue
Block a user