Module: SolidCacheDashboard::ApplicationHelper
- Defined in:
- app/helpers/solid_cache_dashboard/application_helper.rb
Instance Method Summary collapse
Instance Method Details
#badge(text, type) ⇒ Object
10 11 12 |
# File 'app/helpers/solid_cache_dashboard/application_helper.rb', line 10 def badge(text, type) tag.span(text, class: "px-2 py-1 text-xs font-medium text-#{type}-700 bg-#{type}-100 rounded-full dark:bg-#{type}-700 dark:text-#{type}-100") end |
#format_date(date) ⇒ Object
14 15 16 17 18 |
# File 'app/helpers/solid_cache_dashboard/application_helper.rb', line 14 def format_date(date) return "N/A" unless date.is_a?(Time) date.strftime("%Y-%m-%d %H:%M:%S") end |
#page_title ⇒ Object
3 4 5 6 7 8 |
# File 'app/helpers/solid_cache_dashboard/application_helper.rb', line 3 def page_title [ content_for(:page_title), SolidCacheDashboard.configuration.title ].compact.join(" - ") end |