Skip to content

Commit

Permalink
Working with Forms - <%= form_with data: {turbo_reflex: ...} %> (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
drnic committed Dec 18, 2022
1 parent afb14ec commit 156ef04
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,19 +244,19 @@ Just specify the `data-turbo-reflex` attribute on the form.
```erb
# app/views/posts/post.html.erb
<%= turbo_frame_tag dom_id(@post) do %>
<%= form_with model: @post, html: { turbo_reflex: "ExampleReflex#work" } do |form| %>
<%= form_with model: @post, data: { turbo_reflex: "ExampleReflex#work" } do |form| %>
...
<% end %>
<% end %>
<%= turbo_frame_tag dom_id(@post) do %>
<%= form_for @post, remote: true, html: { turbo_reflex: "ExampleReflex#work" } do |form| %>
<%= form_for @post, remote: true, data: { turbo_reflex: "ExampleReflex#work" } do |form| %>
...
<% end %>
<% end %>
<%= form_with model: @post,
html: { turbo_frame: dom_id(@post), turbo_reflex: "ExampleReflex#work" } do |form| %>
data: { turbo_frame: dom_id(@post), turbo_reflex: "ExampleReflex#work" } do |form| %>
...
<% end %>
```
Expand Down

0 comments on commit 156ef04

Please sign in to comment.