Created
September 7, 2015 08:42
-
-
Save gamov/4e3368c17d5164dec3ce to your computer and use it in GitHub Desktop.
Yield in partial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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"} |
aruprakshit
commented
Sep 7, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment