module UiHelpers::FlashHelpers

Public Instance Methods

ui_error(content = nil, &block) click to toggle source
# 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) click to toggle source
# 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