crown_marketplace_utils 0.1.0.beta.7 → 0.1.0.beta.8
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8ff7350d450cf26c0a9c0e0c5f215c8b0b79768081899bd3bd0abbbf40a3a16
|
4
|
+
data.tar.gz: 8d45b24b65f109bafc768b632410914efc7226f55b9e8903d9460780e9c80486
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f560935447ef4b6171da259337d13843fa46331c37a5d3838695753fe38252b47f3af64dacc9aa4cc59f065296f78f63f595df6d3ea0ec03a1b855848b44ae61
|
7
|
+
data.tar.gz: f5430c2deb151ae09a4b6d3f6dad2dbeb2e32f6393d69a31a45f9697567197b2367fbf88487108e1615fa15363d4dd5e2ddaf659c0ff485014d17146e63fcdd6
|
data/Gemfile.lock
CHANGED
@@ -50,10 +50,15 @@ module CrownMarketplaceUtils
|
|
50
50
|
#
|
51
51
|
# @option (see #govuk_error_message)
|
52
52
|
#
|
53
|
-
# @return
|
53
|
+
# @return [NilClass, ActiveSupport::SafeBuffer] if the error message is not on the model it will return nil,
|
54
|
+
# otherwise the HTML for the GOV.UK Error message
|
55
|
+
# which can then be rendered on the page is returned
|
54
56
|
|
55
57
|
def govuk_error_message_with_model(model, attribute, **govuk_error_message_options)
|
56
|
-
|
58
|
+
error_message = model.errors[attribute].first
|
59
|
+
return unless error_message
|
60
|
+
|
61
|
+
govuk_error_message(error_message, attribute, **govuk_error_message_options)
|
57
62
|
end
|
58
63
|
end
|
59
64
|
end
|
@@ -134,7 +134,7 @@ module CrownMarketplaceUtils
|
|
134
134
|
govuk_pagination_next_options[:attributes][:class] = "govuk-link govuk-pagination__link #{'pagination--button_as_link' if govuk_pagination_next_options[:form]}".rstrip
|
135
135
|
govuk_pagination_next_options[:attributes][:rel] = 'next'
|
136
136
|
|
137
|
-
pagination_next_content = govuk_pagination_next_content(block_is_level, govuk_pagination_next_options)
|
137
|
+
pagination_next_content = govuk_pagination_next_content(block_is_level, **govuk_pagination_next_options)
|
138
138
|
|
139
139
|
tag.div(class: 'govuk-pagination__next') do
|
140
140
|
if govuk_pagination_next_options[:form]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crown_marketplace_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.beta.
|
4
|
+
version: 0.1.0.beta.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tim-s-ccs
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01-
|
11
|
+
date: 2023-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionview
|