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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0d8ee306c4e6bccb39cdd7cfa2c84dbe0a89c13a011354619bdf99ed1151227b
4
- data.tar.gz: 5b969ad0910739a3d4d0e67e03e28ff7d0e292b60df0dabf9e837fc3030c90f4
3
+ metadata.gz: 631c8a9418186db9bba40eeed7d122996c161c6f44bba58a230840e3ee063b73
4
+ data.tar.gz: 82a5ae9c0f6aa62920cdba71fb8e31f279aea21fdb8c989b297f15e04e1e06d7
5
5
  SHA512:
6
- metadata.gz: d8aaa747059a1deb309124fd69e180dc1b08789d361a5cd86a4bc6274361d6dcc90a4d5f51448f4ebb408ad865138be49d3b3dab1b90c85fa08b77590316b3df
7
- data.tar.gz: 37673dc337b3bcbd127d434a03ba0e8c2c50577233546ccb05a234a3270fe1aa5718f116395086150a13977d4d703ec442d9cfe179aa21d245d770c46df6fab3
6
+ metadata.gz: acab4a53dd1d91888490a537e4b85234c451ac2c57af072a2cb383a63cd7009db6f7130ceb8d2b710b9f012f660727873c897419bd64e98c57e8003cf6118418
7
+ data.tar.gz: c3b124d95d7e1dab694fcb86fb83ed2e90efc4502121a6d87e4263b7b7bf7590f0a1505c47e7d08b6cff49230d1ea40d26eadf98a906a3ab55cc1d9ccf8e7ad3
@@ -1,3 +1,3 @@
1
1
  module ActAsFireRecordBeta
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -32,9 +32,16 @@ module ActAsFireRecordBeta
32
32
  extend Forwardable
33
33
  delegate :logger => Rails
34
34
 
35
- def firestore_attributes(*names)
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: act_as_fire_record_beta
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Junichi Ito