Sha256: 9805b53b9210a744c7b1c6750fa8f07824a46bb66fc4cfd6c0d41419b6afd169

Contents?: true

Size: 300 Bytes

Versions: 8

Compression:

Stored size: 300 Bytes

Contents

class Dvl::Components::Flashes < Erector::Widget
  needs :flash

  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 '&times;'.html_safe
        span text v
      }
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
dvl-core-0.0.12 lib/dvl/components/flashes.rb
dvl-core-0.0.11 lib/dvl/components/flashes.rb
dvl-core-0.0.10 lib/dvl/components/flashes.rb
dvl-core-0.0.9 lib/dvl/components/flashes.rb
dvl-core-0.0.8 lib/dvl/components/flashes.rb
dvl-core-0.0.7 lib/dvl/components/flashes.rb
dvl-core-0.0.6 lib/dvl/components/flashes.rb
dvl-core-0.0.5 lib/dvl/components/flashes.rb