Skip to content

Instantly share code, notes, and snippets.

@gmoeck
Created April 5, 2010 21:41
Show Gist options
  • Save gmoeck/356935 to your computer and use it in GitHub Desktop.
Save gmoeck/356935 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