lib/mobility/plugins/sequel/dirty.rb in mobility-1.0.0.beta2 vs lib/mobility/plugins/sequel/dirty.rb in mobility-1.0.0.rc1
- old
+ new
@@ -49,10 +49,10 @@
module BackendMethods
# @!group Backend Accessors
# @!macro backend_writer
# @param [Hash] options
- def write(locale, value, options = {})
+ def write(locale, value, **options)
locale_accessor = Mobility.normalize_locale_accessor(attribute, locale).to_sym
if model.column_changes.has_key?(locale_accessor) && model.initial_values[locale_accessor] == value
super
[model.changed_columns, model.initial_values].each { |h| h.delete(locale_accessor) }
elsif read(locale, **options.merge(fallback: false)) != value