Skip to content

Instantly share code, notes, and snippets.

@khash
Created February 12, 2021 05:17
Show Gist options
  • Save khash/0d08232796c143014922d5915b09d901 to your computer and use it in GitHub Desktop.
Save khash/0d08232796c143014922d5915b09d901 to your computer and use it in GitHub Desktop.
With Hotwire
<%= turbo_frame_tag :switch do %>
<%= button_to switch_path do %>
<%= switch.state %>
<%= hidden_field_tag :state, switch.state %>
<% end %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment