Module: LotusAdmin::ApplicationHelper
- Defined in:
- app/helpers/lotus_admin/application_helper.rb
Instance Method Summary collapse
Instance Method Details
#body_class(*extra) ⇒ Object
3 4 5 |
# File 'app/helpers/lotus_admin/application_helper.rb', line 3 def body_class(*extra) [controller_name, action_name.parameterize].concat(extra) end |
#flash_message(message, type = 'alert') ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'app/helpers/lotus_admin/application_helper.rb', line 7 def (, type='alert') css_class = case type.to_sym when :alert then 'alert-alert alert-warning' when :error then 'alert-error alert-danger' when :notice then 'alert-success alert-notice' when :info then 'alert-info' end content_tag(:div, raw(), class: "alert #{css_class}") end |