run queries instead of deleting
run queries instead of deleting
Link to test case: https://editor.datatables.net/reference/event/preRemove
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
I have a database like:
create_table "item_categories", force: :cascade do |t|
t.bigint "subscription_id"
t.uuid "uuid"
t.uuid "parent"
t.text "name"
t.text "description"
** t.boolean "enable" -> default true**
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["subscription_id"], name: "index_item_categories_on_subscription_id"
end
Now, I would like that instead of DELETE the line, the value of enable is changed to false. How can I do this?
I have tried with
{ extend: 'remove', editor: editor}
But I couldn't understand how it works.
I like examples (I'm not a programmer), if it was possible to point to an example I would be very happy.
Answers
This example here is doing exactly what you want. Can you take a look, and let us know if you have problems implementing it,
Colin
Thank's