Skip to content

Instantly share code, notes, and snippets.

@maecha
Last active April 2, 2018 07:34
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save maecha/e08ccdba8ef09a52cac500fea761180c to your computer and use it in GitHub Desktop.
How to make the disabled-link with CoffeeScript / for Ruby on Rails 5.1.4
$(document).on 'turbolinks:load', ->
do ->
$('.disabled-link').click (e) ->
e.preventDefault()
return
= link_to 'HOGE', '', class: 'disabled-link'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment