Files
fizzy/app/controllers/commands/undos_controller.rb
T
2025-05-06 09:25:52 +02:00

15 lines
286 B
Ruby

class Commands::UndosController < ApplicationController
before_action :set_command
def create
@command.undo
@command.destroy
redirect_back_or_to root_path
end
private
def set_command
@command = Current.user.commands.find(params[:command_id])
end
end