diff --git a/app/controllers/flash_controller.rb b/app/controllers/flash_controller.rb index 1624eaa..9cbe6cc 100644 --- a/app/controllers/flash_controller.rb +++ b/app/controllers/flash_controller.rb @@ -1,6 +1,8 @@ # interaction with the flash message class FlashController < ApplicationController def index; end + def redirect_with_notice = redirect_to flash_path, notice: build_message(:notice) + def redirect_with_alert = redirect_to flash_path, alert: build_message(:alert) def turbo_notice flash[:notice] = 'From Turbo' @@ -8,14 +10,6 @@ class FlashController < ApplicationController render turbo_stream: flash_stream end - def redirect_with_notice - redirect_to flash_path, notice: build_message(:notice) - end - - def redirect_with_alert - redirect_to flash_path, alert: build_message(:alert) - end - private def build_message(type_of_message)