metadata_presenter 0.13.7 → 0.14.0
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/README.md +4 -0
- data/app/controllers/metadata_presenter/submissions_controller.rb +12 -0
- data/lib/metadata_presenter/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: baead988b8948ffbff35fdd3b30b740953b339ff7d161ad08259e0a90949f81d
|
4
|
+
data.tar.gz: be77cea809e6b9b5680db1fb426d4333045efb06daa907e18477da9d72c14db6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 942d95095d9b7a5a12286f286319b16cc4ae63e9c40b2eb4640ec07823f8f8ecc5f7fe35fadc4db3178446878c52f10aaeea85d9368979ac6b79ab0a0e07806f
|
7
|
+
data.tar.gz: 1ede80c50a8e03ba13a84b9ceba9bbfdb1d8c6908227a6791bba75b08d024e6e7e7f44e8f9e7bbbd77c55fd166b69143843cac693e8180be73f00e1676f2d541
|
data/README.md
CHANGED
@@ -48,6 +48,7 @@ that you need to write the following methods in your controller:
|
|
48
48
|
1. save_user_data
|
49
49
|
2. load_user_data
|
50
50
|
3. editable?
|
51
|
+
4. create_submission
|
51
52
|
|
52
53
|
The user answers can be accessed via `params[:answers]`.
|
53
54
|
|
@@ -76,6 +77,9 @@ mountable app:
|
|
76
77
|
end
|
77
78
|
```
|
78
79
|
|
80
|
+
The `create_submission` is related to process the submission in a backend
|
81
|
+
service.
|
82
|
+
|
79
83
|
## Generate documentation
|
80
84
|
|
81
85
|
Run `rake doc` and open the doc/index.html
|
@@ -4,10 +4,22 @@ module MetadataPresenter
|
|
4
4
|
@page = service.confirmation_page
|
5
5
|
|
6
6
|
if @page
|
7
|
+
create_submission
|
7
8
|
redirect_to_page @page.url
|
8
9
|
else
|
9
10
|
not_found
|
10
11
|
end
|
11
12
|
end
|
13
|
+
|
14
|
+
def create_submission
|
15
|
+
# The runner is the only app that sends the submission.
|
16
|
+
# and it is not needed on the editor app (editing & previewing).
|
17
|
+
# So in the Runner we defined the #create_submission in the parent
|
18
|
+
# controller and in the Editor we don't.
|
19
|
+
#
|
20
|
+
if defined? super
|
21
|
+
super
|
22
|
+
end
|
23
|
+
end
|
12
24
|
end
|
13
25
|
end
|