Keith Schacht’s Weblog

Subscribe

Friday, 17th May 2024

đź“ť Using Hotwire it was simple to build inline title editing #

After generating the Rails scaffolding for my “Conversation” model, it was just a few steps to do inline editing:

  1. Modify conversations/_conversation.html.erb to wrap it in a turbo-frame
  2. Modify conversations/_form.html.erb partial to wrap it in the same turbo-frame so that the form will replace the displayed title
  3. Add a tiny bit of stimulus to enable submit on enter/blur and to enable discard with Escape
Read more â–ľ

2024 » May

MTWTFSS
  12345
6789101112
13141516171819
20212223242526
2728293031