Module: GlobalizeFixResetAttribute

Defined in:
lib/ab_admin/hooks/globalize_locale_suffix_accessors.rb

Instance Method Summary collapse

Instance Method Details

#_reset_attribute(name) ⇒ Object


31
32
33
34
35
# File 'lib/ab_admin/hooks/globalize_locale_suffix_accessors.rb', line 31

def _reset_attribute name
  old_value = record.changed_attributes[name]
  record.original_changed_attributes.except!(name)
  record.send("#{name}=", old_value)
end