File tree 6 files changed +6
-6
lines changed
6 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ def publisher_metadata
23
23
{
24
24
published : published ,
25
25
last_updated : updated ,
26
- link_to_history : !! updated ,
26
+ link_to_history : updated . present? ,
27
27
other : {
28
28
from : from ,
29
29
} ,
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ def requesting_a_part?
16
16
end
17
17
18
18
def has_valid_part?
19
- !! current_part && current_part != parts . first
19
+ current_part && current_part != parts . first
20
20
end
21
21
22
22
def current_part_title
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ def change_history
35
35
end
36
36
end
37
37
38
- # The direction of change history isn’ t guaranteed
38
+ # The direction of change history isn' t guaranteed
39
39
# https://github.com/alphagov/govuk-content-schemas/issues/545
40
40
def reverse_chronological_change_history
41
41
change_history . sort_by { |item | Time . zone . parse ( item [ :timestamp ] ) } . reverse
Original file line number Diff line number Diff line change @@ -214,7 +214,7 @@ def any_updates?
214
214
# Example:
215
215
# https://www.gov.uk/aaib-reports/lockheed-l1011-385-1-15-g-bhbr-19-december-1989
216
216
def bulk_published?
217
- !! facet_values [ "bulk_published" ]
217
+ facet_values [ "bulk_published" ] . present?
218
218
end
219
219
220
220
def statutory_instrument?
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ def change_description
123
123
# This led to users appending (in a variety of formats)
124
124
# "Latest update:" to the start of the change description. The frontend now
125
125
# has a latest update label, so we can strip this out.
126
- # Avoids: "Latest update: Latest update - … "
126
+ # Avoids: "Latest update: Latest update - ... "
127
127
def latest_update
128
128
change_description . sub ( /^Latest update:?\s -?\s ?/i , "" ) . tap do |latest |
129
129
latest [ 0 ] = latest [ 0 ] . capitalize if latest . present?
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ class ConsultationTest < ActionDispatch::IntegrationTest
56
56
57
57
assert page . has_text? ( "Consultation" )
58
58
59
- # There’ s no daylight savings after 2037
59
+ # There' s no daylight savings after 2037
60
60
# http://timezonesjl.readthedocs.io/en/stable/faq/#far-future-zoneddatetime-with-variabletimezone
61
61
assert page . has_css? ( ".gem-c-notice" , text : "This consultation opens at 1pm on 5 October 2200" )
62
62
assert page . has_text? ( :all , "It closes at 4pm on 31 October 2210" )
You can’t perform that action at this time.
0 commit comments