act_as_fire_record_beta 0.0.3 → 0.0.4
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/lib/act_as_fire_record_beta/version.rb +1 -1
- data/lib/act_as_fire_record_beta.rb +9 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 631c8a9418186db9bba40eeed7d122996c161c6f44bba58a230840e3ee063b73
|
4
|
+
data.tar.gz: 82a5ae9c0f6aa62920cdba71fb8e31f279aea21fdb8c989b297f15e04e1e06d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: acab4a53dd1d91888490a537e4b85234c451ac2c57af072a2cb383a63cd7009db6f7130ceb8d2b710b9f012f660727873c897419bd64e98c57e8003cf6118418
|
7
|
+
data.tar.gz: c3b124d95d7e1dab694fcb86fb83ed2e90efc4502121a6d87e4263b7b7bf7590f0a1505c47e7d08b6cff49230d1ea40d26eadf98a906a3ab55cc1d9ccf8e7ad3
|
@@ -32,9 +32,16 @@ module ActAsFireRecordBeta
|
|
32
32
|
extend Forwardable
|
33
33
|
delegate :logger => Rails
|
34
34
|
|
35
|
-
|
35
|
+
# Copied from activemodel-7.0.4/lib/active_model/attributes.rb
|
36
|
+
NO_DEFAULT_PROVIDED = Object.new
|
37
|
+
|
38
|
+
def firestore_attribute(name, cast_type = nil, default: NO_DEFAULT_PROVIDED, **options)
|
39
|
+
attribute(name, cast_type, default: default, **options)
|
40
|
+
firestore_attributes << name.to_sym
|
41
|
+
end
|
42
|
+
|
43
|
+
def firestore_attributes
|
36
44
|
@_firestore_attributes ||= []
|
37
|
-
@_firestore_attributes += names.map(&:to_sym)
|
38
45
|
end
|
39
46
|
|
40
47
|
def col
|