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
We'd like to enable users to bulk-update records from the Index page.
We need a back-end for it.
Approach
Create a BulkUpdateController which will take in a payload and update those records accordingly.
execute field validation from the model (Rails should do it for us)
accepted params should be verified
fields marked as disabled should not be updated
ensure the values are updated through fill_field method for every field
Possible payload this controller action can take:
{payload: [{param: "user_12o3211o3i3h"# or just the idresource_type: Avo::Resources::User,body: {first_name: "John",age: 33}},{param: "user_k3k6no2i"# or just the idresource_type: Avo::Resources::User,body: {first_name: "John",age: 33}},{param: 123resource_type: Avo::Resources::Post,body: {title: "What a great day",body: "# Lorem ipsum"user_id: "user_12o3211o3i3h"}}]}
Context
We'd like to enable users to bulk-update records from the
Index
page.We need a back-end for it.
Approach
Create a
BulkUpdateController
which will take in a payload and update those records accordingly.disabled
should not be updatedfill_field
method for every fieldPossible payload this controller action can take:
Approach video: https://www.loom.com/share/f41a28048b8d4b80a3296e80d85fab41?sid=f1ba9ce6-41e2-48c0-9d3b-b4734169317f
The text was updated successfully, but these errors were encountered: