Module: AdministrateTailwindTheme::ViewHelper
- Defined in:
- lib/administrate_tailwind_theme/view_helper.rb
Instance Method Summary collapse
Instance Method Details
#flash_types(key) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/administrate_tailwind_theme/view_helper.rb', line 5 def flash_types(key) case key.to_sym when :notice 'Notice' when :alert 'Alert' when :error 'Error' else key.to_s.humanize end end |
#icon?(resource) ⇒ Boolean
18 19 20 |
# File 'lib/administrate_tailwind_theme/view_helper.rb', line 18 def icon?(resource) lookup_context.find_all("administrate/navigation/icons/_#{resource}").any? end |