Render a flash div
4
This will render a flash div only if there is a message in flash. Also will set the id to the flash key.
flash[:notice] returns
This is the notice
flash[:notice] returns
This is the notice
def render_flash
output = []
for key,value in flash
output << "<div id=\"#{key.to_s.downcase}\">#{value}</div>"
end if flash
output.join
end






There are currently no comments for this snippet.