Class: StompBase::Console::SecurityWarningComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- StompBase::Console::SecurityWarningComponent
- Defined in:
- app/components/stomp_base/console/security_warning_component.rb
Instance Method Summary collapse
Methods inherited from BaseComponent
Instance Method Details
#environment_warning_color ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'app/components/stomp_base/console/security_warning_component.rb', line 6 def environment_warning_color case Rails.env when "production" "bg-red-100 border-red-200 text-red-800" when "staging" "bg-yellow-100 border-yellow-200 text-yellow-800" else "bg-blue-100 border-blue-200 text-blue-800" end end |
#production? ⇒ Boolean
17 18 19 |
# File 'app/components/stomp_base/console/security_warning_component.rb', line 17 def production? Rails.env.production? end |