Created
March 12, 2018 16:45
-
-
Save alexishida/602b3b354a9a2ee07b45b4a8b2bc49af to your computer and use it in GitHub Desktop.
flahs notifications bootstrap rails
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 characters
| <% if notice || alert %> | |
| <% t = 'success' if notice %> | |
| <% t = 'danger' if alert %> | |
| <% | |
| if notice && notice.split('^')[0] == 'warning' | |
| t = 'warning' | |
| m = notice.split('^')[1] | |
| else | |
| m = notice || alert | |
| end | |
| %> | |
| <% if m %> | |
| <div class="alert alert-<%= t %> alert-bordered"> | |
| <button type="button" class="close" data-dismiss="alert"><span>×</span><span class="sr-only">Fechar</span></button> | |
| <%= m.html_safe %> | |
| </div> | |
| <% end %> | |
| <% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment