invoices: fix 500 on the admin invoice page
All checks were successful
Build and Deploy to Production / test (push) Successful in 26s
Build and Deploy to Production / build (push) Successful in 1m2s
Build and Deploy to Production / deploy (push) Successful in 36s

Replacing the paid button with the cancel/hide action block cut the old
markup at the first <% end %>, which belonged to the button's inner
if/else, leaving a stray </button></form><% end %> behind. show.erb no
longer compiled and every admin invoice page returned 500; nothing
rendered that page in tests.

Remove the leftovers, render the page in every state (pending, paid,
cancelled, hidden), and compile every view in a test so an unbalanced
template fails CI even when no test visits that page.

Assisted-by: Claude:opus-5
This commit is contained in:
Sergei Poljanski 2026-10-10 08:47:23 +04:00
commit bf4f270fb4
Signed by: asxpi
GPG key ID: 4F8851660FA4121B
3 changed files with 29 additions and 3 deletions

View file

@ -68,9 +68,6 @@
</form>
<% end %>
</div>
<% end %>
</button>
</form>
<% end %>
<p style="margin-top: 14px;">
<% if can?('invoices', 'write') %><a href="/admin/invoices/<%= @invoice.uuid %>/duplicate">Use as template for a new invoice →</a><% end %>