Simple, nicer Rails notifications
Ruby JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



Simple, nicer Rails notifications

Showandtell provides an incredibly easy way to integrate Twitter bootstrap notifications into your Rails 3.1+ app.

  1. Add gem 'showandtell' to your Gemfile
  2. Add //=require showandtell to your app/assets/javascripts/application.js
  3. Add *= require showandtell to your app/assets/stylesheets/application.css
  4. Done.

Note that your notifications must have a class of flash and an id of flash_severity where severity is the type of notification - notice, alert, etc. The appropriate code for this is:

<% if flash %>
<div id="flash_messages">
    <% flash.each do |name, msg| %>
        <% if name == :notice %>
        <div class="alert alert-success">
        <% elsif name == :alert %>
        <div class="alert alert-error">
        <% else %>
        <div class="alert alert-info">
        <% end %>
        <a class="close" data-dismiss="alert">×</a>
            <%= msg %>
    <% end %>
<% end %>

Bug Reports

If you run into a bug, please start by searching the GitHub issue tracker page. If you find one matching your problem, please feel free to add to the discussion. If you can't find one, please create a new issue.


  • Fork the project on GitHub.
  • Make your changes.
  • Open a pull request. Let me know what you did and why you did it. Unless there is a really good reason for it, please don't tell me how you did it. That should be fairly evident from the new code. Assuming the request makes sense, I'll pull your changes.



Licensed under the MIT license.