Skip to content

Instantly share code, notes, and snippets.

@stefanpenner
Created January 22, 2010 02:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stefanpenner/283459 to your computer and use it in GitHub Desktop.
Save stefanpenner/283459 to your computer and use it in GitHub Desktop.
These assume they abide by the global presets, if presets need to be overridden they can be by adding the attribute with the appropriate value to the element.
data-asynchronous='false'
data-eval-scripts='false'
(this asssumes they values are defaulted to true)
API:
link_to_remote "Delete this post", :update => "posts", :url => { :action => "destroy", :id => post.id }
UJS:
<a href='/blog/3' data-remote data-method='destroy' rel='nofollow'>Delete this post</a>
API
form_remote_tag :html => { :action => url_for(:controller => "some", :action => "place") }
UJS:
<form data-remote action='/some/place' method='post' >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment