Improve contest view
Some checks are pending
CI / scan_ruby (push) Waiting to run
CI / scan_js (push) Waiting to run
CI / lint (push) Waiting to run
CI / test (push) Waiting to run

This commit is contained in:
sto
2025-03-16 09:22:27 +01:00
parent 7ec51b6d85
commit 785e523ebe
5 changed files with 39 additions and 20 deletions

View File

@@ -1,4 +1,4 @@
= form_with model: puzzle, url: "/contests/#{contest.id}/puzzles", method: :post do |form|
= form_with model: puzzle, url: url, method: method do |form|
.row.mb-3
.col
.form-floating

View File

@@ -0,0 +1 @@
= render "form", contest: @contest, puzzle: @puzzle, submit_text: "Save", method: :patch, url: "/contests/#{@contest.id}/puzzles/#{@puzzle.id}"

View File

@@ -1 +1 @@
= render "form", contest: @contest, puzzle: @puzzle, submit_text: "Add"
= render "form", contest: @contest, puzzle: @puzzle, submit_text: "Add", method: :post, url: "/contests/#{@contest.id}/puzzles"