Phoenix_live_view: raise if a non router-based LV attempts to live redirect

Created on 17 Aug 2019  路  4Comments  路  Source: phoenixframework/phoenix_live_view

Only the root may issue live redirects

Most helpful comment

Nice. I'm going to give it a go 馃槃

All 4 comments

Hey, @chrismccord. I think that there's already a test for that scenario here and it's passing. Am I missing something or is this issue already solved? 馃

Yes, sorry I should have added more context. We properly raise for a child, but we need to also raise for a widget style "root", which is rendered within a regular EEx template, or from the controller. Would love a PR if you're up for it

Nice. I'm going to give it a go 馃槃

@chrismccord Hello, I wrote a test for this scenario, but I couldn't think in a good way to know if a LV is non router-based using live_redirect/2.

I was thinking about using something like route_info/4, but since we only have the socket and the path we are going to (not from) on live_redirect/2, I don't know what to do. 馃

I may be missing something, but if you could give me any hint, I would appreciate it a lot 馃槵

Was this page helpful?
0 / 5 - 0 ratings

Related issues

josevalim picture josevalim  路  3Comments

tfwright picture tfwright  路  3Comments

tmepple picture tmepple  路  4Comments

bannmoore picture bannmoore  路  3Comments

josevalim picture josevalim  路  3Comments