From a6a8fe3d64c8f897fb7f16bfe2f7d61b0b90f72a Mon Sep 17 00:00:00 2001 From: Christophe Vilayphiou Date: Fri, 27 Jul 2012 19:37:25 +0800 Subject: [PATCH] Remove remaining 18n_variables --- app/models/user/role.rb | 1 - app/models/user/user.rb | 2 +- .../views/panel/web_resource/back_end/web_links/_form.html.erb | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/models/user/role.rb b/app/models/user/role.rb index 64db9ac2..bbcedfc7 100644 --- a/app/models/user/role.rb +++ b/app/models/user/role.rb @@ -10,7 +10,6 @@ class Role has_many :sub_roles, :autosave => true, :dependent => :destroy has_many :users - accepts_nested_attributes_for :i18n_variable, :allow_destroy => true accepts_nested_attributes_for :sub_roles, :allow_destroy => true def is_built_in? diff --git a/app/models/user/user.rb b/app/models/user/user.rb index 1f7b11d7..f51d49f0 100644 --- a/app/models/user/user.rb +++ b/app/models/user/user.rb @@ -36,7 +36,7 @@ class User # self.build_cache_dept key: "dept_cache_user_#{self.id}" # end dept_hash[locale] = sub_roles.collect{|sr| sr.title}.join(',') - # self.cache_dept[locale] = sub_roles.collect{|sr| sr.i18n_variable[locale]}.join(',') + # self.cache_dept[locale] = sub_roles.collect{|sr| sr.title}.join(',') end self.cache_dept = dept_hash self.save! diff --git a/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_links/_form.html.erb b/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_links/_form.html.erb index 1274b884..ccb7c9bb 100644 --- a/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_links/_form.html.erb +++ b/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_links/_form.html.erb @@ -54,7 +54,7 @@
<%= f.label :category ,t("web_resource.category")%> - <%= f.select :web_link_category_id, @web_link_categorys.collect {|t| [ t.i18n_variable[I18n.locale], t.id ]} %> + <%= f.select :web_link_category_id, @web_link_categorys.collect {|t| [ t.title, t.id ]} %>