Skip to content

Commit

Permalink
Adds simple_format to notes field.
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Scherz committed May 16, 2024
1 parent 46c3258 commit 224b4ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/software_records/_general.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
<% if !@software_record.notes.nil? && !@software_record.notes.to_s.empty? %>
<dt>Notes</dt>
<dd>
<ul><%= @software_record.notes %></ul>
<ul><%= simple_format(@software_record.notes) %></ul>
</dd>
<% end %>

Expand Down
2 changes: 2 additions & 0 deletions spec/views/software_records/show.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
dev_support_servers: 'dev.example.com',
date_cert_expires: '2020-01-01',
monitor_certificates: 'Yes',
notes: "Line one\nLine two",
themes: true,
modules: true
))
Expand All @@ -79,6 +80,7 @@
expect(rendered).to match(/MyText/)
expect(rendered).to match(/1/)
expect(rendered).to match(/DUO/)
expect(rendered).to match(/Line one\n<br \/>Line two/)
end

it 'renders change management attributes in <p>' do
Expand Down

0 comments on commit 224b4ab

Please sign in to comment.