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

Version Path
loyal3-sentry-0.4.2 lib/sentry/asymmetric_sentry_callback.rb
loyal3-sentry-0.4.3 lib/sentry/asymmetric_sentry_callback.rb
loyal3-sentry-0.4.4 lib/sentry/asymmetric_sentry_callback.rb
loyal3-sentry-0.5.0 lib/sentry/asymmetric_sentry_callback.rb
loyal3-sentry-0.5.2 lib/sentry/asymmetric_sentry_callback.rb
pivotal-sentry-0.4.0 lib/sentry/asymmetric_sentry_callback.rb
shipstar-sentry-0.5.2.1 lib/sentry/asymmetric_sentry_callback.rb
sentry-0.5.3 lib/sentry/asymmetric_sentry_callback.rb