attr_encrypted 4.1.0 → 4.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/attr_encrypted/adapters/active_record.rb +11 -11
- data/lib/attr_encrypted/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c21421f2067b7534cedb1a861331873c4b3de6b578d9f0afa0579d7fb734cfa
|
4
|
+
data.tar.gz: 73d1180d07c224bc7b8a7d80691cde48a07eb6d9fd009d7d5a41974b6bde02e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 559cccac0a575b7c7834a0464c7ab218549e59cecc1c43d3ba6d7177994d18759d76b04e5a574d45a22ef0d57cb24f3881242282cb6ce3425b462d48cf48b3be
|
7
|
+
data.tar.gz: '09933cf933635867a06243b779ab46673266372a6b314f70a09faddac7aa75cb501b52510beb1f06f87a6a2ad104ff023e2d9b0b93a1c4f71e8888ab0b4a7dcc'
|
data/CHANGELOG.md
CHANGED
@@ -6,19 +6,18 @@ if defined?(ActiveRecord::Base)
|
|
6
6
|
module ActiveRecord
|
7
7
|
RAILS_VERSION = Gem::Version.new(::ActiveRecord::VERSION::STRING).freeze
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
def reload(*args, &block)
|
15
|
-
result = reload_without_attr_encrypted(*args, &block)
|
16
|
-
self.class.attr_encrypted_encrypted_attributes.keys.each do |attribute_name|
|
17
|
-
instance_variable_set("@#{attribute_name}", nil)
|
18
|
-
end
|
19
|
-
result
|
9
|
+
module Reload
|
10
|
+
def reload(...)
|
11
|
+
result = super
|
12
|
+
self.class.attr_encrypted_encrypted_attributes.keys.each do |attribute_name|
|
13
|
+
instance_variable_set("@#{attribute_name}", nil)
|
20
14
|
end
|
15
|
+
result
|
16
|
+
end
|
17
|
+
end
|
21
18
|
|
19
|
+
def self.extended(base) # :nodoc:
|
20
|
+
base.class_eval do
|
22
21
|
attr_encrypted_options[:encode] = true
|
23
22
|
|
24
23
|
class << self
|
@@ -148,5 +147,6 @@ if defined?(ActiveRecord::Base)
|
|
148
147
|
ActiveSupport.on_load(:active_record) do
|
149
148
|
extend AttrEncrypted
|
150
149
|
extend AttrEncrypted::Adapters::ActiveRecord
|
150
|
+
prepend AttrEncrypted::Adapters::ActiveRecord::Reload
|
151
151
|
end
|
152
152
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: attr_encrypted
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.
|
4
|
+
version: 4.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Huber
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2024-
|
16
|
+
date: 2024-09-20 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: encryptor
|