I've only been in RoR for a short time.
I have a list table with a field: status(enabled, disabled) and end_date, I have my form where I put a certain end time. I would like that when reaching this end time, the status field changes to disabled. is there anything i can do to achieve this ?
create_table "lists", force: :cascade do |t|
t.integer "user_id"
t.binary "uuid", limit: 36
t.string "name"
t.string "description"
t.datetime "end_date"
t.integer "status", default: 1
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["user_id"], name: "index_lists_on_user_id"
end
Aucun commentaire:
Enregistrer un commentaire