Skip to content

Instantly share code, notes, and snippets.

@alistairtweed
Created April 4, 2017 15:13
Show Gist options
  • Save alistairtweed/fb1c455309b4ae8a296a63699a21ea88 to your computer and use it in GitHub Desktop.
Save alistairtweed/fb1c455309b4ae8a296a63699a21ea88 to your computer and use it in GitHub Desktop.
Remote Links
class ApplicationController < ActionController::Base
def remote_link
respond_to do |format|
format.js
end
end
end
= link_to "Remote Link", remote_link_url, remote: true
get "remote-link", to: "application#remote_link", as: :remote_link
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment