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
> Note that item actions are always displayed if they are defined. If you want to remove item actions completely, you must restrict access to them with `can?/3` and remove the action with the `item_actions/1` function.
202
202
203
203
## Resource Actions
@@ -659,8 +659,8 @@ defmodule Backpex.LiveResource do
659
659
* `:layout` - Layout to be used by the LiveResource.
660
660
* `:schema` - Schema for the resource.
661
661
* `:repo` - Ecto repo that will be used to perform CRUD operations for the given schema.
662
-
* `:update_changeset` - Changeset that will be used when updating items. Optionally takes the target as the third parameter.
663
-
* `:create_changeset` - Changeset that will be used when creating items. Optionally takes the target as the third parameter.
662
+
* `:update_changeset` - Changeset to use when updating items. Optionally takes the target as the third parameter and the assigns as the fourth.
663
+
* `:create_changeset` - Changeset to use when creating items. Optionally takes the target as the third parameter and the assigns as the fourth.
664
664
* `:pubsub` - PubSub name of the project.
665
665
* `:topic` - The topic for PubSub.
666
666
* `:event_prefix` - The event prefix for Pubsub, to differentiate between events of different resources when subscribed to multiple resources.
@@ -1008,7 +1008,8 @@ defmodule Backpex.LiveResource do
1008
1008
Backpex.LiveResource.call_changeset_function(
1009
1009
item,
1010
1010
changeset_function,
1011
-
default_attrs(live_action,fields,assigns)
1011
+
default_attrs(live_action,fields,assigns),
1012
+
assigns
1012
1013
)
1013
1014
1014
1015
socket
@@ -1967,13 +1968,13 @@ defmodule Backpex.LiveResource do
1967
1968
@doc"""
1968
1969
Calls the changeset function with the given change and target.
0 commit comments