Skip to content

Instantly share code, notes, and snippets.

View brennacodes's full-sized avatar

Brenna Stuart brennacodes

View GitHub Profile
@wicliff
wicliff / rails_bootstrap_delete_confirmation_modal.md
Created June 24, 2012 20:45 — forked from postpostmodern/rails_bootstrap_delete_confirmation_modal.md
A nice delete confirmation modal in Rails courtesy of Bootstrap. Now remote.

Here's what you get.

Some CoffeeScript (verbosely commented for clarity)

# Override Rails handling of confirmation

$.rails.allowAction = (element) ->
  # The message is something like "Are you sure?"
  message = element.data('confirm')