spatial_features 2.4.0 → 2.4.1
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
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bb6bfa561f291c96ad983f88e7ce6f13a5961190
|
|
4
|
+
data.tar.gz: 4236d1b48756f5d8789b98afbfc1e47215b36423
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fb674ccbed4762a6c12196a9b5e8471b9469aed8e8012490a61d217d445ba70319bdbbe969412d4ab80f09279aaaa0e178eca29f660f4340f85270ca3e319875
|
|
7
|
+
data.tar.gz: 4a8d33366da54cc7754308634c87aee43fd3e0b72ba31659548b427f4f959179ca7f1f12bfe61ffd15795a45dfefcf305d272bb31339678b789f2c4dc06141f5
|
|
@@ -12,9 +12,9 @@ module SpatialFeatures
|
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
module ClassMethods
|
|
15
|
-
def update_features!(skip_invalid: false)
|
|
15
|
+
def update_features!(skip_invalid: false, **options)
|
|
16
16
|
find_each do |record|
|
|
17
|
-
record.update_features!(skip_invalid: skip_invalid)
|
|
17
|
+
record.update_features!(skip_invalid: skip_invalid, **options)
|
|
18
18
|
end
|
|
19
19
|
end
|
|
20
20
|
end
|
|
@@ -16,14 +16,19 @@ module SpatialFeatures
|
|
|
16
16
|
object.class
|
|
17
17
|
when ActiveRecord::Relation
|
|
18
18
|
object.klass
|
|
19
|
+
when String
|
|
20
|
+
object.constantize
|
|
19
21
|
else
|
|
20
22
|
object
|
|
21
23
|
end
|
|
22
24
|
end
|
|
23
25
|
|
|
24
26
|
def id_sql(object)
|
|
25
|
-
|
|
27
|
+
case object
|
|
28
|
+
when ActiveRecord::Base
|
|
26
29
|
object.id || '0'
|
|
30
|
+
when String
|
|
31
|
+
id_sql(object.constantize)
|
|
27
32
|
else
|
|
28
33
|
object.unscope(:select).select(:id).to_sql
|
|
29
34
|
end
|