Closed christoomey closed 3 years ago
No hurry on my end (and nice to connect as well 👋). I implemented this directly in my own codebase, but felt like it was worth upstreaming, so wanted to share here.
For sure. And for your other question, yes rails docs contributions are always welcome on https://github.com/inertiajs/inertiajs.com . We have a bad habit of occasionally batch adding things instead of as they release 😄 .
Hey @BrandonShar, happy new year 👋 Wanted to check back in and see if this was still in consideration.
gah, sorry; totally slipped my mind!
@christoomey just tagged 1.9.0
, let me know if anything seems amiss.
And thanks for the bump!
Awesome, thanks!
This builds on the work in 40f36a5580a3362ed2e9dbd23373b61e82dfc98d which added an inertia-aware wrapper around
redirect_to
.This change implements the same inertia errors handling for
redirect_back
, which I've found to be particularly useful when working with Inertia, especially with error handling.Note: I, unfortunately, wasn't able to get the specs running locally (see notes in https://github.com/inertiajs/inertia-rails/issues/55).
Also, I noticed that this behavior is currently undocumented on the inertia site, and I only discovered this feature by reading through recent PRs. I'd be happy to add to the documentation, assuming that's something that would of interest.