Project

puffly

0.01
No release in over 3 years
Low commit activity in last 3 years
Cute flash messages for your ruby on rails application.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.13
~> 4.0
~> 12.3
~> 3.4
 Project Readme

Puffly

Gem Version Gem

Fun and cute flash messages for your Ruby on Rails application.

Installation

Add this line to your application's Gemfile:

gem 'puffly'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install puffly

Once installed, add the following to your application.scss:

@import "puffly";

and your application.js:

//= require puffly

Usage

Add this lines to your application.erb or the main layout of your application:

<% flash.each do |type, msg| %>
  <%= content_tag :span, msg, class: "#{type}", id: "puffly" %>
<% end %>

And add the flash message to the action of your controller:

flash[OPTION] = "Your message"

You can set some options when creating a flash message.

OPTION SASS Variable HEX Color
:success $color-sucess #3DC763
:error $color-error #ED3D3D
:warning $color-warning #FF9800
:notice $color-notice #2B5C7F
:alert $color-alert #03A9F4

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/kevyder/puffly.

License

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