Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: fd2b45c84f
Fetching contributors…

Cannot retrieve contributors at this time

17 lines (17 sloc) 0.583 kb
module BootstrapFlashHelper
def bootstrap_flash
flash_messages = []
flash.each do |type, message|
# Skip Devise :timeout and :timedout flags
next if type == :timeout
next if type == :timedout
type = :success if type == :notice
type = :error if type == :alert
text = content_tag(:div,
content_tag(:button, raw("×"), :class => "close", "data-dismiss" => "alert") +
message, :class => "alert fade in alert-#{type}")
flash_messages << text if message
end
flash_messages.join("\n").html_safe
end
end
Jump to Line
Something went wrong with that request. Please try again.