Sha256: 3b35dce7e4632387a6d1a350058a2445b1e036337622f44454ce8c08c06432a4

Contents?: true

Size: 851 Bytes

Versions: 33

Compression:

Stored size: 851 Bytes

Contents

<!-- Renders a Rails flash message wrapped in a `<div>` tag

### Attributes

 - `type` - which flash message to display. Defaults to `:notice`

### CSS Classes

The flash is output in a `<div class="flash notice">`, where `notice` is the `type` specified.

  -->
<def tag="flash-message" attrs="type">
  <% type = type ? type.to_sym : :notice -%>
  <div class="flash #{type}" if="&flash[type]" merge-attrs><%= flash[type] %></div>
</def>


<!-- Renders `<flash-message>` for every flash type given in the `names` attribute (comma separated), or for all flash messages that have been set if `names` is not given -->
<def tag="flash-messages" attrs="names"><%=
  scope.flash_rendered = true if scope.respond_to? :flash_rendered
  names = names.nil? ? flash.keys : comma_split(names)
  names.map { |name| flash_message :type => name }.safe_join
%></def>

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
hobo_rapid-2.2.6 taglibs/pages/flash_message.dryml
hobo_rapid-2.2.5 taglibs/pages/flash_message.dryml
hobo_rapid-2.2.4 taglibs/pages/flash_message.dryml
hobo_rapid-2.2.3 taglibs/pages/flash_message.dryml
hobo_rapid-2.2.2 taglibs/pages/flash_message.dryml
hobo_rapid-2.2.1 taglibs/pages/flash_message.dryml
hobo_rapid-2.2.0 taglibs/pages/flash_message.dryml
hobo_rapid-2.1.2 taglibs/pages/flash_message.dryml
hobo_rapid-2.1.1 taglibs/pages/flash_message.dryml
hobo_rapid-2.1.0 taglibs/pages/flash_message.dryml
hobo_rapid-2.1.0.pre4 taglibs/pages/flash_message.dryml
hobo_rapid-2.1.0.pre3 taglibs/pages/flash_message.dryml
hobo_rapid-2.1.0.pre2 taglibs/pages/flash_message.dryml
hobo_rapid-2.1.0.pre1 taglibs/pages/flash_message.dryml
hobo_rapid-2.0.1 taglibs/pages/flash_message.dryml
hobo_rapid-2.0.0 taglibs/pages/flash_message.dryml
hobo_rapid-2.0.0.pre10 taglibs/pages/flash_message.dryml
hobo_rapid-2.0.0.pre9 taglibs/pages/flash_message.dryml
hobo_rapid-2.0.0.pre8 taglibs/pages/flash_message.dryml
hobo_rapid-2.0.0.pre7 taglibs/pages/flash_message.dryml