metadata_presenter 3.3.34 → 3.3.35

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: c8518bc2fca3d0f5fec907a7b15c8eb032fc8c33e079809e778713765841010e
4
- data.tar.gz: 2d27dcca2327531e0ecf8da4208cffc6456d96a91ab0d1ff71d2ec92032bb305
3
+ metadata.gz: b1c0f9efcd3ccefe26dbbd01e6503a4e47a84e7d68df5dae76299ac53c869e70
4
+ data.tar.gz: bb54be9040c515c64ace352d337b5b2aa000260647e02164738f047550eaa2a0
5
5
  SHA512:
6
- metadata.gz: c0d26fc240f57980e3282c9a7d4d30ba3e76abc121fde1139f64aa3159b5df8f4e82105df6141dc1f3d783a2091d4a4f0f5d0ae93b75e66d79ddc39048442bd4
7
- data.tar.gz: 8cd9283fd1b7f93ab1bb51db351b84df694c3a9e23e0f98a50c22a652eca8cc18eba19d3d81548649f7af4385700f222ef22014b07c2d1915710e1abc34384dd
6
+ metadata.gz: 25bfcf637501fcebaf73c1d4058188cb4350c3a8420c9da4ecbc54de89aae31da70a6ef0e410874c968f42608b60ed4550a86d90a0bc841d96aa88be92b23347
7
+ data.tar.gz: f4bbcf62535963748332e4a6addfb1b93c0d74f3939ad706dca7da9968f8ce64ecfe6b83a96eb8e458129aa0c19b844a20e5f5f44d0f584bfd98dd91984921c6
@@ -41,7 +41,14 @@ module MetadataPresenter
41
41
 
42
42
  def email_confirmation
43
43
  @saved_form = session[:saved_form]
44
- @email_confirmation = EmailConfirmation.new(@saved_form['email'])
44
+
45
+ if @saved_form
46
+ @email_confirmation = EmailConfirmation.new(@saved_form['email'])
47
+ else
48
+ # we see errors when the session saved form is nil, if this is affecting real users we'd prefer to
49
+ # bump them back to the create step, but we can't easily recreate all the params and we can't cover crawlers hitting the page directly
50
+ redirect_back fallback_location: root_path
51
+ end
45
52
  end
46
53
 
47
54
  def confirm_email
@@ -1,7 +1,7 @@
1
1
  <div class="fb-main-grid-wrapper">
2
2
  <div class="govuk-grid-row">
3
3
  <div class="govuk-grid-column-two-thirds">
4
- <a class="govuk-back-link" href="<%= :back %>"><%= t('presenter.back') %></a>
4
+ <%= link_to t('presenter.back'), :back, class: "govuk-back-link" %>
5
5
  <%= form_for @email_confirmation do |f| %>
6
6
  <%= f.govuk_error_summary(t('presenter.errors.summary_heading')) %>
7
7
  <div class="govuk-form-group">
@@ -1,3 +1,3 @@
1
1
  module MetadataPresenter
2
- VERSION = '3.3.34'.freeze
2
+ VERSION = '3.3.35'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metadata_presenter
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.34
4
+ version: 3.3.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - MoJ Forms
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-22 00:00:00.000000000 Z
11
+ date: 2024-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_design_system_formbuilder