Can I customize the behaviour of the DELETE button to soft delete instead? #2550
-
Hey guys, is that possible to override the default behaviour of the delete button? I'm using the https://github.com/jhawthorn/discard gem and would like to call If overriding is not possible, can I hide the delete button at least so I can only keep a discard action visible? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
There are a few ways of doing that.
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
@adrianthedev does this discussion may be implemented here? |
Beta Was this translation helpful? Give feedback.
-
Let's start a conversation here about how to implement the soft-delete (calling it SD from now on) functionality in Avo. In the begining it looks like a simple problem that a developer only needs to add the soft-delete action to the UI, but it goes a bit deeper:
My thoughts:
Possible gems
My gem recommendationsIt seems like I wouldn't use
https://www.ruby-toolbox.com/categories/Active_Record_Soft_Delete I am looking for more things I might have overlooked. Let's keep this conversation going. |
Beta Was this translation helpful? Give feedback.
There are a few ways of doing that.
show_controls
to hide the destroy button and add the soft-delete one on the show pageauthorization
feature to remove the ability to destroy a record for a user