Flashee

Rails helper to add CSS classes to flash messages

Installation

Add this line to your application's Gemfile:

gem 'flashee'

And then execute:

$ bundle

Or install it yourself as:

$ gem install flashee

Usage

Once flashee is installed, run the install generator to setup required files:

$ rails g flashee:install

There are several sub-generators to use if you are using a CSS framework.

# bootstrap
$ rails g flashee:install:boostrap

# foundation
$ rails g flashee:install:foundation

# bulma
$ rails g flashee:install:bulma

After flashee is installed add this line to your application layout:

<%= render partial: "partials/flash_messages", flash: flash %>

Configuration

Once flashee is installed, open up app/helpers/flashee_helper.rb and you can add what CSS classes get rendered for each flash type. you can also append for flash types as you see fit. The aim of flashee is to be front-end-framework agnostic and completely up to you on how it functions.

License

The gem is available as open source under the terms of the MIT License.