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
If I understand correctly, preload_actions callback allows the user to specify which actions will be preloaded with resources but the preload_actions definition will include some default actions ([:show, :edit, :update, :delete, :index]) even if we pass one action, for example we want to preload only on :show action, so we should pass this action to preload_actions but it will append default actions to that making :show action duplicated ie. [:show, :show, :edit, :update, :delete, :index]
My suggestion is to return a list of preload actions provided by user and not include additional routes.
If I understand correctly,
preload_actions
callback allows the user to specify which actions will be preloaded with resources but thepreload_actions
definition will include some default actions ([:show, :edit, :update, :delete, :index]) even if we pass one action, for example we want to preload only on:show
action, so we should pass this action topreload_actions
but it will append default actions to that making:show
action duplicated ie. [:show, :show, :edit, :update, :delete, :index]My suggestion is to return a list of preload actions provided by user and not include additional routes.
preload_actions
callback definition:permit_phoenix/lib/permit_phoenix/controller.ex
Lines 124 to 132 in 7a92b6f
The text was updated successfully, but these errors were encountered: