Files
project-work/worker-toolkit-stocks-in-the-future/repo/app/controllers/announcements_controller.rb
Eric Bell 2854619bc9 chore: init commit
in worker.../repo/GITFOLDER.zip is the .git folder.
2026-08-11 14:44:09 -04:00

16 lines
356 B
Ruby

# frozen_string_literal: true
class AnnouncementsController < ApplicationController
before_action :set_announcement, only: %i[show]
def show; end
private
def set_announcement
@announcement = Announcement.find(params.expect(:id))
rescue ActiveRecord::RecordNotFound
redirect_to root_path, alert: t("announcements.not_found")
end
end