Last active
October 30, 2019 02:49
-
-
Save balvig/9d6269f78c0bfde6c686d328eb1d4772 to your computer and use it in GitHub Desktop.
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
<!-- layouts/application.html.erb --> | |
<div data-controller="modal"> | |
<%= link_to "Get Started", "#", data-action="modal#show" %> | |
<div data-target="modal.dialog" style="display: none;"> | |
<% form_for authentications_path do |f| %> | |
<!-- Form markup --> | |
<% end %> | |
</div> | |
</div> |
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
export default class extends Controller { | |
static targets = ["dialog"] | |
show() { | |
this.dialogTarget.style.display = "block"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment