n8-attr_encrypted 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,4 @@
1
+
1
2
  if defined?(ActiveRecord)
2
3
  module AttrEncrypted
3
4
  module Adapters
@@ -15,7 +16,7 @@ if defined?(ActiveRecord)
15
16
 
16
17
  def resave_encrypted_attributes
17
18
  self.class.encrypted_attributes.each do |attribute, encrypted_attribute_method|
18
- send("#{attribute}=", instance_variable_get("@#{attribute}"))
19
+ send("#{attribute}=", instance_variable_get("@#{attribute}")) if instance_variable_get("@#{attribute}").present?
19
20
  end
20
21
  end
21
22
  end
@@ -62,10 +63,13 @@ if defined?(ActiveRecord)
62
63
  end
63
64
  method_missing_without_attr_encrypted(method, *args, &block)
64
65
  end
65
-
66
+
67
+
66
68
  end
67
69
  end
68
70
  end
71
+
69
72
 
70
73
  ActiveRecord::Base.extend AttrEncrypted::Adapters::ActiveRecord
71
- end
74
+ end
75
+
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: n8-attr_encrypted
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 2
10
- version: 1.1.2
9
+ - 3
10
+ version: 1.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sean Huber