You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.
This is almost perfect. For :index, :new or :create action the handle_not_found/2 will never call error handler. For our case it's essential to allow visit nested pages only if parent resource exists.
So now when I visit /hypervisors/999/networks the conn.assigns[:hypervisor will be nil, I'd expect a 404 error.
The text was updated successfully, but these errors were encountered:
We have the
Network
model which belongs to theHypervisor
, and/networks
resources are nested like this:According to the docs
persisted
option is a bless for nested resources.This is almost perfect. For
:index
,:new
or:create
action thehandle_not_found/2
will never call error handler. For our case it's essential to allow visit nested pages only if parent resource exists.So now when I visit
/hypervisors/999/networks
theconn.assigns[:hypervisor
will benil
, I'd expect a 404 error.The text was updated successfully, but these errors were encountered: