Module: AttrEncrypted::Adapters::ActiveRecord::Reload

Defined in:
lib/attr_encrypted/adapters/active_record.rb

Instance Method Summary collapse

Instance Method Details

#reloadObject



10
11
12
13
14
15
16
# File 'lib/attr_encrypted/adapters/active_record.rb', line 10

def reload(...)
  result = super
  self.class.attr_encrypted_encrypted_attributes.keys.each do |attribute_name|
    instance_variable_set("@#{attribute_name}", nil)
  end
  result
end