In a rails project I am using the cocoon gem to create a nested form. In the provided example, the method link_to_remove_association
is used, generating a link which deletes the current nested form when clicked.
This works fine as a link, but I wish to have the same functionality in a nested bootstrap button. Is this possible?
The best I have so far (which only inserts a link within the button):
%span.input-group-btn
%button.btn.btn-default.btn-lg{type: 'button'}
= link_to_remove_association "X", f, type:'button'