Remove remaining 18n_variables

This commit is contained in:
Christophe Vilayphiou 2012-07-27 19:37:25 +08:00
parent 23854e7adc
commit a6a8fe3d64
3 changed files with 2 additions and 3 deletions

View File

@ -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?

View File

@ -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!

View File

@ -54,7 +54,7 @@
<div id="post-body-content" class="clear">
<%= 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 ]} %>
<ul class="nav nav-tabs">
<% @site_valid_locales.each_with_index do |locale, i| %>