hoardable 0.14.0 → 0.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/hoardable/encrypted_rich_text.rb +3 -2
- data/lib/hoardable/has_rich_text.rb +0 -1
- data/lib/hoardable/version.rb +1 -1
- data/lib/hoardable.rb +1 -0
- 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: befa1333fe9f96fa12949d58483241b3ea576cd21503cfb47586b22dbaf36fe4
|
4
|
+
data.tar.gz: '02390d38824b7fe05d5f8ffd9c8e0714d27da5b35d5fe4c2fee9e3f7775125fd'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83d0cb32b0363b0a1387e041301c6ddf9d55e40a8aa3d1c1d6c40416bdfb3c90115a0a37af25238474b96c0a54d9816f06ad5747b8f5d279d6af5aec09602e49
|
7
|
+
data.tar.gz: 2c8ca8c336cca19bc9f4e7199d6da3474df932415e6a481c1f6868df8b440e60820a68837bda8e137bd55922401950b646b0a8be94e4b0208854022befafff6e
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -326,7 +326,7 @@ end
|
|
326
326
|
### Hoardable Has Many & Has One
|
327
327
|
|
328
328
|
Sometimes you'll have a Hoardable record that `has_one` or `has_many` other Hoardable records and you will
|
329
|
-
want to know the state of both the parent record and the children at a
|
329
|
+
want to know the state of both the parent record and the children at a certain point in time. You accomplish
|
330
330
|
this by adding `hoardable: true` to the `has_many` relationship and using the `Hoardable.at` method:
|
331
331
|
|
332
332
|
```ruby
|
@@ -1,8 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Hoardable
|
4
|
-
# A {Hoardable} subclass of {ActionText::EncryptedRichText}.
|
5
|
-
class EncryptedRichText < ActionText::
|
4
|
+
# A {Hoardable} subclass of {ActionText::RichText} like {ActionText::EncryptedRichText}.
|
5
|
+
class EncryptedRichText < ActionText::RichText
|
6
6
|
include Model
|
7
|
+
encrypts :body
|
7
8
|
end
|
8
9
|
end
|
@@ -14,7 +14,6 @@ module Hoardable
|
|
14
14
|
end
|
15
15
|
return unless hoardable
|
16
16
|
|
17
|
-
'ActionText::RichText'.constantize # forces ActionText::RichText to load if it has not
|
18
17
|
reflection_options = reflections["rich_text_#{name}"].options
|
19
18
|
reflection_options[:class_name] = reflection_options[:class_name].sub(/ActionText/, 'Hoardable')
|
20
19
|
end
|
data/lib/hoardable/version.rb
CHANGED
data/lib/hoardable.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hoardable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- justin talbott
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|