Walther Diechmann


10 Experience
0 Lessons Completed
0 Questions Solved


Posted in Hotwire Modal Forms Discussion

Solid lesson, Chris! I do miss one tiny issue though :(

When saving the form and it has errors all is good - but when the form is good!?

Remember - you're on the index.html.erb already and opening a modal will afford you to prepend new posts on /posts across all tabs/connected users, and all is great.

I can format.turbo_stream { render turbo_stream: turbo_stream.remove( "post_form" ) } but that does not close the modal and will leave me with "an empty" DIV if I somehow manages to get the modal.hide() working. A "how to attach to the webhooks of Turbo really would come in handy <3

And then there is the 'edit' action on the modal too - same song more or less.

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2021 GoRails, LLC. All rights reserved.