user4133294
user4133294

Reputation:

Rails: How to make a form remote?

I'm trying to make my comment form remote, but no matter how I add remote: true, I get an error.

I want to add remote: true to this line:

<%= form_for [@thing, @comment] do |f| %>

What is the proper syntax to achieve this?

Upvotes: 0

Views: 39

Answers (1)

Sergey Sokolov
Sergey Sokolov

Reputation: 994

<%= form_for([@thing, @comment], remote: true) do |f| %>

Upvotes: 2

Related Questions