labimotion 1.0.0 → 1.0.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 +4 -4
- data/lib/labimotion/helpers/generic_helpers.rb +4 -5
- data/lib/labimotion/version.rb +1 -1
- 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: 83f0da3d6432a0ba7540d64776e8842517388dd310034ba47fa4009a0098aae1
|
|
4
|
+
data.tar.gz: ebdb71841e25f430469989361183eed16bfba8d45574c1e1fbac3094d397a484
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d9f45db60f7d2d7c199658dbcda29b2b00b62184d16bbbb60a7318c4e04d52cd13fdf64f8944ac90851c5e584b7a8fe7c1469a019d09f0ae7a4e7b3240294167
|
|
7
|
+
data.tar.gz: aeffedf19b1e83fbf15a6cecb634075a496e8f1700c5bed20c7624ccc9a05c8b58836e889e50ec5a1a609e13153bf88b7042f59ac24aaea00acffd6f218a4f54
|
|
@@ -193,7 +193,7 @@ module Labimotion
|
|
|
193
193
|
(files || []).each_with_index do |file, index|
|
|
194
194
|
next unless (tempfile = file[:tempfile])
|
|
195
195
|
|
|
196
|
-
|
|
196
|
+
att = Attachment.new(
|
|
197
197
|
bucket: file[:container_id],
|
|
198
198
|
filename: file[:filename],
|
|
199
199
|
con_state: Labimotion::ConState::NONE,
|
|
@@ -205,7 +205,7 @@ module Labimotion
|
|
|
205
205
|
attachable_type: type,
|
|
206
206
|
attachable_id: id,
|
|
207
207
|
)
|
|
208
|
-
|
|
208
|
+
begin
|
|
209
209
|
att.save!
|
|
210
210
|
attach_ary.push(att.id)
|
|
211
211
|
ensure
|
|
@@ -214,12 +214,11 @@ module Labimotion
|
|
|
214
214
|
end
|
|
215
215
|
end
|
|
216
216
|
unless (del_files || []).empty?
|
|
217
|
-
Attachment.where('id IN (?) AND attachable_type = (?)', del_files.map!(&:to_i),
|
|
218
|
-
type).update_all(attachable_id: nil)
|
|
217
|
+
Attachment.where('id IN (?) AND attachable_type = (?)', del_files.map!(&:to_i), type).update_all(attachable_id: nil)
|
|
219
218
|
end
|
|
220
219
|
attach_ary
|
|
221
220
|
rescue StandardError => e
|
|
222
|
-
Labimotion.log_exception(e
|
|
221
|
+
Labimotion.log_exception(e)
|
|
223
222
|
raise e
|
|
224
223
|
end
|
|
225
224
|
|
data/lib/labimotion/version.rb
CHANGED