rufus-scheduler 수정

This commit is contained in:
2025-04-19 06:37:09 +09:00
parent def8d28c3b
commit 9ca6e10ac1
6 changed files with 38 additions and 6 deletions

View File

@@ -30,6 +30,14 @@ class SchedulesController < ApplicationController
end
end
def reset
Schedule.delete_all
ActiveRecord::Base.connection.execute("DELETE FROM sqlite_sequence WHERE name='schedules'")
Rails.application.load_seed
redirect_to schedules_path, notice: "스케줄이 초기화되었습니다."
end
def schedule_edit
@schedule = Schedule.order(:hour, :minute)
end