Class: Dvl::Components::Flashes

Inherits:
Erector::Widget
  • Object
show all
Defined in:
lib/dvl/components/flashes.rb

Instance Method Summary collapse

Instance Method Details

#contentObject



4
5
6
7
8
9
10
11
# File 'lib/dvl/components/flashes.rb', line 4

def content
  @flash.select { |k, v| k.to_s.in?(%w(success error info)) && v.present? }.each do |k, v|
    div(class: "flash flash_#{k}") {
      a.flash_close '×'.html_safe
      span text v
    }
  end
end