From cb77e84d28dd1be47d4010c30a0b5665804c47ad Mon Sep 17 00:00:00 2001 From: manson Date: Wed, 14 May 2014 15:40:19 +0800 Subject: [PATCH] Fix sidebar registration --- lib/links/engine.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/links/engine.rb b/lib/links/engine.rb index f2bd16f..791ea97 100644 --- a/lib/links/engine.rb +++ b/lib/links/engine.rb @@ -30,14 +30,14 @@ module WebResource 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=>'web_resource').id}", :priority=>3, :active_for_action=>{'admin/web_resources.'=>'categories'}, :active_for_category => 'WebResource', :available_for => [:manager] 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=>'web_resource').id}", :priority=>4, :active_for_action=>{'admin/web_resources'=>'tags'}, :active_for_tag => 'WebResource',