Module: UiHelpers::FlashHelpers
- Included in:
- ActionViewExtension
- Defined in:
- lib/ui_helpers/helpers/flash.rb
Instance Method Summary collapse
Instance Method Details
#ui_error(content = nil, &block) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/ui_helpers/helpers/flash.rb', line 4 def ui_error(content = nil, &block) content ||= capture(&block) UiHelpers::Flash.new(:state => "error", :style => "padding: 0 .7em;", :icon => {:name => "alert", :style => "float: left; margin-right: .3em;"}).html(:div) do |buffer| buffer << content end end |
#ui_highlight(content = nil, &block) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/ui_helpers/helpers/flash.rb', line 11 def ui_highlight(content = nil, &block) content ||= capture(&block) UiHelpers::Flash.new(:state => "highlight", :style => "padding: 0 .7em;", :icon => {:name => "info", :style => "float: left; margin-right: .3em;"}).html(:div) do |buffer| buffer << content end end |