16 lines
325 B
Ruby
16 lines
325 B
Ruby
class Meta
|
|
|
|
include Mongoid::Document
|
|
include Mongoid::Timestamps
|
|
|
|
field :key
|
|
field :value, :default => nil
|
|
|
|
has_one :i18n_variable, :as => :language_value, :autosave => true, :dependent => :destroy
|
|
|
|
def get_name_content
|
|
[self.key, self.value ? self.value : self.i18n_variable[I18n.locale]]
|
|
end
|
|
|
|
end
|