I have a form that I would like to submit with the data-remote=true
option. But I want to have my create action return json, then have that handled by javascript that already exists on the page. Can I set a callback inline with the form_for tag?
Something similar to this:
=form_for @foo,:remote => true, :success => "my_js_stuff" do |f|
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…