Forked from roberto/_flash_messages.html.erb
Last active
January 1, 2016 08:29
Revisions
-
JoshTGreenwood revised this gist
Dec 24, 2013 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,16 +3,16 @@ module ApplicationHelper def bootstrap_class_for flash_type case flash_type when :success "alert-success" # Green when :error "alert-danger" # Red when :alert "alert-warning" # Yellow when :notice "alert-info" # Blue else flash_type.to_s end end end -
roberto revised this gist
Aug 13, 2012 . No changes.There are no files selected for viewing
-
roberto revised this gist
Aug 13, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ <%= render partial: "shared/flash_messages", flash: flash %> -
roberto created this gist
Aug 13, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ <% flash.each do |type, message| %> <div class="alert <%= bootstrap_class_for(type) %> fade in"> <button class="close" data-dismiss="alert">×</button> <%= message %> </div> <% end %> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ <%= render :partial => "shared/flash_messages", :locals => {:flash => flash} %> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ module ApplicationHelper def bootstrap_class_for flash_type case flash_type when :success "alert-success" when :error "alert-error" when :alert "alert-block" when :notice "alert-info" else flash_type.to_s end end end