Add CouchFoo.property_i18n method
This commit is contained in:
1 parent
c895469d34
commit
28612514e3
4 files changed
+19
-9
No files matched your search
+13
-1
@@ -43,4 +43,16 @@ end
|
||||
|
||||
VALID_LOCALES = ["en", "zh_tw"]
|
||||
require 'couch_foo'
|
||||
CouchFoo::Base.set_database(:host => "http://localhost:5984", :database => "r4")
|
||||
CouchFoo::Base.set_database(:host => "http://localhost:5984", :database => "r4")
|
||||
|
||||
class CouchFoo::Base
|
||||
|
||||
def self.property_i18n(property_name, property_type)
|
||||
VALID_LOCALES.each do |locale|
|
||||
property "#{property_name.to_s}_#{locale}", property_type
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user