fixes announcements i18n

This commit is contained in:
Wen-Tien Chang committed 2009-07-06 16:36:41 +08:00
1 parent ff2dffaeb4
commit 691d514fa1
5 files changed
+52 -20

No files matched your search

+5 -1
View File
@@ -50,7 +50,11 @@ class CouchFoo::Base
def self.property_i18n(property_name, property_type)
VALID_LOCALES.each do |locale|
property "#{property_name.to_s}_#{locale}".to_sym, property_type
end
end
define_method( property_name ) do
self.read_attribute("#{property_name.to_s}_#{I18n.locale}")
end
end
end