Remove i18n_variable for controllers, helpers and models

This commit is contained in:
Christophe Vilayphiou committed 2012-07-26 05:07:32 +08:00
1 parent 94337a58d5
commit acb7fe0dea
16 files changed
+196 -103

No files matched your search

+2 -3
View File
@@ -4,16 +4,15 @@ class Meta
include Mongoid::Timestamps
field :key
field :title, localize: true
field :value, :default => nil
has_one :i18n_variable, :as => :language_value, :autosave => true, :dependent => :destroy
def get_name_content
[self.key, get_content]
end
def get_content
self.value ? self.value : self.i18n_variable[I18n.locale]
self.value ? self.value : self.title
end
end