inertiajs / inertia-rails

The Rails adapter for Inertia.js.
https://inertia-rails.dev/
MIT License
574 stars 45 forks source link

Add inertia_location controller method #48

Closed BrandonShar closed 4 years ago

BrandonShar commented 4 years ago

This adds an inertia_location method to keep feature parity with the Laravel version of Inertia.

Usage

def create
   inertia_location index_path
end

Further Reading

https://github.com/inertiajs/inertia-laravel/pull/154 https://github.com/inertiajs/inertia-laravel/issues/57

reinink commented 4 years ago

Once this is merged, it would be awesome if you could update the docs for this: https://inertiajs.com/redirects#external-redirects

BrandonShar commented 4 years ago

@reinink thanks for the reminder, we'll make sure to update the docs once we go live!

Should be tagged soon, we just want to make sure we understand that test regression. I think it's unrelated, but we needed to set up a local reproduction to be sure.

reinink commented 4 years ago

@BrandonShar Thanks! I didn't even notice the failing test with approving. 😅

It would be great to get this merged in, as this is a pretty handy little feature!

Appreciate all your help. 🙌

bknoles commented 4 years ago

https://github.com/rails/rails/pull/28081

found the culprit for the failing test! i'm merging this in and cutting a new release

BrandonShar commented 4 years ago

of course. I figured if it was something like that, but didn't think it was the test itself doing it.

Thanks @bknoles !

reinink commented 4 years ago

Thanks for making this happen gents! 🙌