Rails form_with: is local:true the same as remote:false?
Asked Answered
Z

1

6

In other words, are these two clauses just mirror images of each other? The documentation for form_with isn't clear on this.

Zarf answered 2/11, 2018 at 18:43 Comment(0)
C
9

local:true the same as remote:false?

If you mean that remote: false of form_for and local: true of form_with are same, then yes, they both are same!. But if mean the remote: false and local: true of form_with are same, then IDK. Infact there isn't any option called remote available in form_with.

The below are the details from form_with and form_for

:local - By default form submits are remote and unobstrusive XHRs. Disable remote submits with local: true.

and

:remote - If set to true, will allow the Unobtrusive JavaScript drivers to control the submit behavior. By default this behavior is an ajax submit.

Caudate answered 6/11, 2018 at 7:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.