2023-10-22 15:45:40 -07:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class ModalController < ApplicationController
|
|
|
|
include ActionView::Helpers::TagHelper
|
|
|
|
include Turbo::FramesHelper
|
|
|
|
|
|
|
|
skip_before_action :find_active_announcements, :banned?
|
|
|
|
|
|
|
|
def close
|
2023-10-23 13:48:08 -07:00
|
|
|
return redirect_to root_path unless turbo_frame_request?
|
2023-10-23 16:11:04 -07:00
|
|
|
|
|
|
|
render inline: turbo_frame_tag("modal") # rubocop:disable Rails/RenderInline
|
2023-10-22 15:45:40 -07:00
|
|
|
end
|
|
|
|
end
|