lib/mobility/sequel/column_changes.rb in mobility-0.1.5 vs lib/mobility/sequel/column_changes.rb in mobility-0.1.6
- old
+ new
@@ -12,10 +12,10 @@
@attributes = attributes
define_method :mobility_set do |attribute, value, locale: Mobility.locale|
if attributes.include?(attribute)
column = attribute.to_sym
- column_with_locale = :"#{attribute}_#{locale}"
+ column_with_locale = :"#{attribute}_#{Mobility.normalize_locale(locale)}"
if mobility_get(attribute) != value
@changed_columns << column_with_locale if !changed_columns.include?(column_with_locale)
@changed_columns << column if !changed_columns.include?(column)
end
end