Created
January 12, 2018 13:09
-
-
Save kobeumut/5615981f49dd7a0943ffcffd6416860b to your computer and use it in GitHub Desktop.
If you want to use href instead of link to. It's equivalent link_to in Rails. And if you want to use method you must use data-method in a tag
This file contains hidden or 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
| <a data-method="delete" href="<%= destroy_user_session_path %>"> | |
| <i class="fa fa-sign-out" aria-hidden="true"></i><span class="hidden-xs hidden-sm">Exit</span> | |
| </a> | |
| <!-- | |
| user signout with devise. That's equivalent to <%= link_to('Exit', destroy_user_session_path, method: :delete) %> | |
| --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment