Use buttons to destroy drafts and questions

As mentioned in commits 5311daadf and bb958daf0, using links combined
with JavaScript to generate POST (or, in this case, DELETE) requests to
the server has a few issues.
This commit is contained in:
Javi Martín
2024-03-06 04:53:15 +01:00
parent 20d3725709
commit ecad046a99
8 changed files with 21 additions and 16 deletions

View File

@@ -346,3 +346,7 @@ end
resolve "Poll::Question::Answer::Video" do |video, options|
[:answer, :video, options.merge(answer_id: video.answer, id: video)]
end
resolve "Legislation::DraftVersion" do |version, options|
[version.process, :draft_version, options.merge(id: version)]
end