delete /initializers/mongoid.rb
This commit is contained in:
parent
e62df90117
commit
e360baadde
|
@ -1,16 +0,0 @@
|
|||
def field_i18n(field, *options)
|
||||
|
||||
['en', 'zh_tw'].each do |locale|
|
||||
field "#{field.to_s}_#{locale}".to_sym, *options
|
||||
end
|
||||
|
||||
define_method(field) do
|
||||
self.send("#{field.to_s}_#{I18n.locale}")
|
||||
end
|
||||
|
||||
define_method("#{field}=") do |value|
|
||||
['en', 'zh_tw'].each do |locale|
|
||||
self.send("#{field.to_s}_#{locale}=", value)
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue