lib/custom_fields/source.rb in custom_fields-2.0.0.rc7 vs lib/custom_fields/source.rb in custom_fields-2.0.0.rc8

- old
+ new

@@ -182,15 +182,15 @@ # puts "[apply_custom_fields_localize_diff] processing: record #{record._id} / #{self._custom_field_localize_diff[name].inspect}" # DEBUG self._custom_field_localize_diff[name].each do |changes| if changes[:localized] value = record.read_attribute(changes[:field].to_sym) - updates[changes[:field]] = { I18n.locale.to_s => value } + updates[changes[:field]] = { Mongoid::Fields::I18n.locale.to_s => value } else # the other way around value = record.read_attribute(changes[:field].to_sym) next if value.nil? - updates[changes[:field]] = value[I18n.locale.to_s] + updates[changes[:field]] = value[Mongoid::Fields::I18n.locale.to_s] end end next if updates.empty? \ No newline at end of file