Skip to content

Instantly share code, notes, and snippets.

@gamov
Created September 7, 2015 08:42
Show Gist options
  • Select an option

  • Save gamov/4e3368c17d5164dec3ce to your computer and use it in GitHub Desktop.

Select an option

Save gamov/4e3368c17d5164dec3ce to your computer and use it in GitHub Desktop.

Revisions

  1. gamov created this gist Sep 7, 2015.
    5 changes: 5 additions & 0 deletions partial.html.haml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    # Problem: block_given always retruns true, either I call the partial with or without a block...
    - if block_given?
    #hidden_deletion_element= yield
    - else
    = link_to(deletion_path, method: :delete, confirm: 'Are you sure?', id: :hidden_deletion_element) { "Delete Me"}