Add Item#ancestors
This commit is contained in:
1 parent
e1440a79d8
commit
32e8bd108f
17 files changed
+60
-37
No files matched your search
@@ -0,0 +1,8 @@
|
||||
module AdminHelper
|
||||
|
||||
def show_parent_items_link(parent_item)
|
||||
@parent_items = @parent_item.ancestors.map{ |i| i.name }
|
||||
( @parent_items.map{ |i| link_to(i, admin_items_path(:parent_name=>i) ) } << parent_item.name ).join("/")
|
||||
end
|
||||
|
||||
end
|
||||
Reference in new issue
Block a user