From 12a62c26b5d9bdd9f338c0d0d79666902f0a5e6b Mon Sep 17 00:00:00 2001 From: manson Date: Wed, 14 May 2014 15:39:40 +0800 Subject: [PATCH] Fix sidebar registration --- lib/announcement/engine.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/announcement/engine.rb b/lib/announcement/engine.rb index d20c2d4..cc29c44 100644 --- a/lib/announcement/engine.rb +++ b/lib/announcement/engine.rb @@ -29,14 +29,14 @@ module Announcement :available_for => [:sub_manager] 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=>'announcement').id}", :priority=>3, :active_for_action=>{'admin/announcements'=>'categories'}, :active_for_category => 'Announcement', :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=>'announcement').id}", :priority=>4, :active_for_action=>{'admin/announcements'=>'tags'}, :active_for_tag => 'Announcement',