Remove i18n_variable for controllers, helpers and models
This commit is contained in:
1 parent
94337a58d5
commit
acb7fe0dea
16 files changed
+196
-103
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user