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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1a03324e5fcda2cc6e240abf9de25153de6d3420df67c756616e28f3ae1d645b
4
- data.tar.gz: 865b8c040daa4e3d80a83a64131b1e5e57c3a720d99c94dc325b121453ca33df
3
+ metadata.gz: baead988b8948ffbff35fdd3b30b740953b339ff7d161ad08259e0a90949f81d
4
+ data.tar.gz: be77cea809e6b9b5680db1fb426d4333045efb06daa907e18477da9d72c14db6
5
5
  SHA512:
6
- metadata.gz: de3122090686c934774b46f29b0db345984681d282c0be662ccf3bd8f8ccb6a8f38dcd5d7660e8b11221b6d617176339aa825eadde59bcf8396e2de8ef8787d9
7
- data.tar.gz: ced8509a65f415a2c0e65378ad3ca880d142e526f8c1ab44e2af6e2f45a2f497ee26d09e6a8037e556b724f8adc6589f1a06a2fdb11a163b25ad706d1f821955
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
@@ -1,3 +1,3 @@
1
1
  module MetadataPresenter
2
- VERSION = '0.13.7'
2
+ VERSION = '0.14.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metadata_presenter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.7
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - MoJ Online