Skip to content

Instantly share code, notes, and snippets.

@stuffness
Created October 30, 2011 09:34
Show Gist options
  • Save stuffness/1325737 to your computer and use it in GitHub Desktop.
Save stuffness/1325737 to your computer and use it in GitHub Desktop.
#relevant controller
def show
@timer = Timer.find(params[:id])
respond_to do |format|
format.html
format.js { render layout: false }
end
end
#relevant coffee - refreshurl has a show action path (e.g. "/timers/77")
refreshtimer = ->
$.getScript(refreshurl)
return null
#show.js.erb - just a test for now
alert("test");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment