From a39d979a54ed3694b331e3e74acd7d0e587b98e8 Mon Sep 17 00:00:00 2001 From: spen Date: Tue, 20 May 2014 17:49:18 +0800 Subject: [PATCH] fix field --- app/models/bulletin.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/models/bulletin.rb b/app/models/bulletin.rb index e8bdd98..57e996e 100644 --- a/app/models/bulletin.rb +++ b/app/models/bulletin.rb @@ -66,6 +66,11 @@ class Bulletin def bulletin_category_with_title self.category.title end + + def bulletin_create_dept + unit_field = User.get_member_list_attribute_field("staff","unit") + User.get_member_list_attribute_value(self.create_user_id,unit_field.id).get_value_by_locale(I18n.locale) rescue nil + end def get_bulletin_category self.category