Skip to content

Instantly share code, notes, and snippets.

@agnellvj
Forked from gmoeck/gist:356935
Created May 27, 2010 03:41
Show Gist options
  • Save agnellvj/415421 to your computer and use it in GitHub Desktop.
Save agnellvj/415421 to your computer and use it in GitHub Desktop.
$(document).ready(function(){
$('.other_submit').click(function(){
this.form.action = this.getAttribute('data-action')
})
})
= submit_tag 'Preview', :'data-action' => 'new_preview' , :class => 'other_submit'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment