Add site_info

This commit is contained in:
Christophe Vilayphiou committed 2012-05-07 00:54:18 +08:00
1 parent 48f8fbde7f
commit 1fb6c20b86
13 files changed
+147 -32

No files matched your search

+8
View File
@@ -7,5 +7,13 @@ class Meta
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]
end
end