Topic: DRY form building with remote_form_for and form_for ??
Hi, I'd like to reuse the same code for building a form whether it's a
standard page, or an inline AJAX form.
Let's use the boolean variable is_ajax to set the environment type (ie if set to true, use remote_form_for; if false, form_for).
Something like this:
send(is_ajax ? "remote_form_for" : "form_for") (...) do |f|
f.text_field ... etc
Anyone know how to do this?