labimotion 1.4.0.rc8 → 1.4.0.rc10
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1160c0d45fcef0b85fed2c8425d10dd918ef2c1485d642ea209bf351f36a6404
|
4
|
+
data.tar.gz: aaf504ed78051becf1e7429336799c64468cd6154b91d0eb2a791bd58964a916
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbb7b484dc00070fb61451addf73748a3460d3fc2ccec6571bdc022192d44a3b0df388c4b2dc57934a4ab1121b63854e639225c09712d909dd85c83df4ef0a82
|
7
|
+
data.tar.gz: a0deb2f4263cdb46e94d240a48077956c41b166b8cc159670b795feb08f4a27f589d4a675fde08245f918f0a92bb0d5b689e8f827b2f6f33a77e2a0c476ccdbc
|
@@ -11,7 +11,7 @@ module Labimotion
|
|
11
11
|
def klass_list(el_klass, is_active=false)
|
12
12
|
scope = Labimotion::SegmentKlass.all
|
13
13
|
scope = scope.where(is_active: is_active) if is_active.present? && is_active == true
|
14
|
-
scope = scope.joins(:element_klass).where(klass_element: params[:element], is_active: true) if el_klass.present?
|
14
|
+
scope = scope.joins(:element_klass).where(klass_element: params[:element], is_active: true).preload(:element_klass) if el_klass.present?
|
15
15
|
scope.order('place') || []
|
16
16
|
end
|
17
17
|
|
@@ -16,6 +16,22 @@ module Labimotion
|
|
16
16
|
self.class.name == 'Container' && container_type != 'dataset'
|
17
17
|
end
|
18
18
|
|
19
|
+
def copy_dataset(orig_ds)
|
20
|
+
return if orig_ds.dataset.nil?
|
21
|
+
|
22
|
+
ods = orig_ds.dataset
|
23
|
+
uuid = SecureRandom.uuid
|
24
|
+
dataset = Labimotion::Dataset.create!(
|
25
|
+
uuid: uuid,
|
26
|
+
dataset_klass_id: ods.dataset_klass_id,
|
27
|
+
element_type: 'Container',
|
28
|
+
element_id: self.id,
|
29
|
+
properties: ods.properties,
|
30
|
+
properties_release: ods.properties_release,
|
31
|
+
klass_uuid: ods.klass_uuid,
|
32
|
+
)
|
33
|
+
end
|
34
|
+
|
19
35
|
def save_dataset(**args)
|
20
36
|
return if not_dataset?
|
21
37
|
|
data/lib/labimotion/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: labimotion
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.0.
|
4
|
+
version: 1.4.0.rc10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chia-Lin Lin
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-07-
|
12
|
+
date: 2024-07-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|