From 7353c1c59349b9a85f087642a157259f2b3b2f28 Mon Sep 17 00:00:00 2001 From: manson Date: Wed, 14 May 2014 15:43:19 +0800 Subject: [PATCH] Fix sidebar registration --- lib/gallery/engine.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/gallery/engine.rb b/lib/gallery/engine.rb index c6411c9..b5dc163 100644 --- a/lib/gallery/engine.rb +++ b/lib/gallery/engine.rb @@ -27,14 +27,14 @@ module Gallery context_link 'categories', :link_path=>"admin_module_app_categories_path" , - :link_arg=>{:module_app_id=>get_module_app.id}, + :link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'gallery').id}", :priority=>3, :active_for_action=>{'admin/galleries'=>'categories'}, :active_for_category => 'Gallery' context_link 'tags', :link_path=>"admin_module_app_tags_path" , - :link_arg=>{:module_app_id=>get_module_app.id}, + :link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'gallery').id}", :priority=>4, :active_for_action=>{'admin/galleries'=>'tags'}, :active_for_tag => 'Gallery'