tramway-core 1.14.1.1 → 1.14.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/forms/tramway/core/application_form.rb +12 -1
- data/lib/tramway/core/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: 8e37bc7fd023ce8768a173d48b50575ac71538cb27078c8cabf2d4aaf996c53c
|
4
|
+
data.tar.gz: 253c5c1543f25b34905341bdc11d9a31e84737cf11a2c1e547c5f0c3d9d16cb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2bb111d0932442985c8a93edd2e3c0acfdeef417565d032560f895584e8efb783c9f3a1323688f8680a29a0cf95485c658e2029b4b0e78f10c7f536374484f20
|
7
|
+
data.tar.gz: fd7a7cdcc2b47374e1c1405b1278219ba4e7e17fc0209bf22895339d24c619d2156a5af641c16b5423ad0ed0ae1ea95f738d1c669938e1015d251d5205aaca27
|
@@ -32,7 +32,18 @@ module Tramway::Core
|
|
32
32
|
|
33
33
|
def submit(params)
|
34
34
|
if params
|
35
|
-
|
35
|
+
if validate params
|
36
|
+
save
|
37
|
+
else
|
38
|
+
association_error = false
|
39
|
+
@@associations.each do |association|
|
40
|
+
if errors.details[association] == [{ error: :blank }]
|
41
|
+
model.send("#{association}=", send(association))
|
42
|
+
association_error = true
|
43
|
+
end
|
44
|
+
end
|
45
|
+
association_error && save
|
46
|
+
end
|
36
47
|
else
|
37
48
|
error = Tramway::Error.new(plugin: :core, method: :submit, message: 'ApplicationForm::Params should not be nil')
|
38
49
|
raise error.message
|
data/lib/tramway/core/version.rb
CHANGED