Module: Theme::Bootstrap::ApplicationHelper
- Defined in:
- app/helpers/theme/bootstrap/application_helper.rb
Instance Method Summary collapse
Instance Method Details
#flash_messages ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'app/helpers/theme/bootstrap/application_helper.rb', line 4 def = [] flash.each do |type, | type = 'success' if type == 'notice' type = 'error' if type == 'alert' text = "<script>toastr.#{type}('#{message}');</script>" << text.html_safe if end .join("\n").html_safe end |