After upgrading Blazer from 3.3.0 to 3.5.0, the Delete button on the query edit page stopped working.
Steps to reproduce
- Use blazer 3.5.0 (or master).
- Open any saved query, e.g. /blazer/queries/1-test.
- Confirm the deletion.
- The record is not deleted — the page just reloads/re-shows the same record.
Same problem reproduces for the Delete buttons on Dashboards and Checks.
Expected behavior
The query is deleted.
Actual behavior
After confirmation, the link is followed with a GET request instead of submitting a DELETE request:
Started GET "/blazer/queries/1-test" for ::1 at ...
Processing by Blazer::QueriesController#show as HTML
Parameters: {"id"=>"1-test"}
This appears to be a regression introduced by f51e239. The commit replaced the data-confirm behavior previously provided by rails-ujs, but did not replace the handling of data-method.
After upgrading Blazer from 3.3.0 to 3.5.0, the Delete button on the query edit page stopped working.
Steps to reproduce
Same problem reproduces for the Delete buttons on Dashboards and Checks.
Expected behavior
The query is deleted.
Actual behavior
After confirmation, the link is followed with a
GETrequest instead of submitting aDELETErequest:This appears to be a regression introduced by f51e239. The commit replaced the
data-confirmbehavior previously provided byrails-ujs, but did not replace the handling ofdata-method.