Class: SolidQueueMonitor::ApplicationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- SolidQueueMonitor::ApplicationController
- Includes:
- ActionController::Flash, ActionController::HttpAuthentication::Basic::ControllerMethods
- Defined in:
- app/controllers/solid_queue_monitor/application_controller.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#set_flash_message(message, type) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/controllers/solid_queue_monitor/application_controller.rb', line 12 def (, type) # Store in instance variable for access in views @flash_message = @flash_type = type # Try to use Rails flash if available begin flash[:notice] = if type == :success flash[:alert] = if type == :error rescue StandardError # Flash not available (e.g., no session middleware) end end |