canary v0.11.0 Release Notes
Release Date: 2015-12-22 // over 8 years ago-
- ✨ Enhancements
- Resources can now be loaded on
:new
and:create
actions, whenpersisted: true
is specified in the plug call. This allows parent resources to be loaded when a child is created. For example, if aPost
resource has multipleComment
children, you may want to load the parentPost
when creating a newComment
. You can load the parentPost
with a separateelixir plug :load_and_authorize_resource, model: Post, id_name: "post_id", persisted: true, only: [:create]
This will cause Canary to try to load the correspondingPost
from the database when creating aComment
at the URL/posts/:post_id/comments
- Resources can now be loaded on
- ✨ Enhancements