Sha256: f3db6bb77b5fdcacfbcaf7e530ec4ce30ce9d4c990303a07a0dd492b035a255e
Contents?: true
Size: 472 Bytes
Versions: 8
Compression:
Stored size: 472 Bytes
Contents
module Sentry class AsymmetricSentryCallback def initialize(attr_name) @attr_name = attr_name end # Performs encryption on before_validation Active Record callback #def before_validation(model) # return if model.send(@attr_name).blank? # model.send("crypted_#{@attr_name}=", AsymmetricSentry.encrypt_to_base64(model.send(@attr_name))) #end #def after_save(model) # model.send("#{@attr_name}=", nil) #end end end
Version data entries
8 entries across 8 versions & 4 rubygems