From 3452a3589699645dcfe2c3d63c88eb52a31621e3 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Sat, 14 Nov 2026 07:22:30 -0500 Subject: [PATCH] Aircraft description stays inside the Details card simple_format makes paragraphs, so the padded box around them is a div: inside a

the browser closed it early and the text spilled out unstyled. Co-Authored-By: Claude Opus 5.5 --- app/views/aircraft/show.html.erb | 2 +- test/integration/more_menu_test.rb | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/views/aircraft/show.html.erb b/app/views/aircraft/show.html.erb index 68f251c..2741782 100644 --- a/app/views/aircraft/show.html.erb +++ b/app/views/aircraft/show.html.erb @@ -87,7 +87,7 @@

<%= t(".hobbs_offset") %>
<%= hours(@aircraft.hobbs_time_offset) %>
<% if @aircraft.description.present? %> -

<%= simple_format @aircraft.description %>

+
<%= simple_format @aircraft.description %>
<% end %> diff --git a/test/integration/more_menu_test.rb b/test/integration/more_menu_test.rb index cc08ea4..9a7a4d8 100644 --- a/test/integration/more_menu_test.rb +++ b/test/integration/more_menu_test.rb @@ -43,4 +43,12 @@ class MoreMenuTest < ActionDispatch::IntegrationTest assert_select "span[title='Your access to this aircraft']", "Owner" assert_select "span.badge-green", text: "Available", count: 0 end + + test "the description keeps its paragraphs inside the Details card" do + @a.update!(description: "First line.\n\nSecond paragraph.") + sign_in @owner + get aircraft_path(@a) + # simple_format makes

s, so the box around them must not be a

(they'd spill out of it). + assert_select "div.border-t > p", 2 + end end