Skip to content

Delete links no longer work after removing rails-ujs #526

Description

@foxy-eyed

After upgrading Blazer from 3.3.0 to 3.5.0, the Delete button on the query edit page stopped working.

Steps to reproduce

  1. Use blazer 3.5.0 (or master).
  2. Open any saved query, e.g. /blazer/queries/1-test.
  3. Confirm the deletion.
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions