AlertifyJS as gem for rails asset pipeline
JavaScript CSS Ruby CoffeeScript
Latest commit cdea6fa Aug 31, 2016 @mkhairi add updater
Failed to load latest commit information.
app bump version v1.8.0 Aug 2, 2016
lib bump version v1.8.0 Aug 2, 2016
.gitignore add updater Aug 31, 2016
Gemfile born Sep 19, 2014
LICENSE.txt born Sep 19, 2014 update readme Apr 22, 2015
Rakefile add updater Aug 31, 2016
alertifyjs-rails.gemspec update version Dec 5, 2014


This gem provides alertify.js for Rails.


In your Gemfile:

gem 'alertifyjs-rails'

or system wide:

$ gem install alertifyjs-rails


The alertify files will be added to the asset pipeline and available for you to use. Add the following line to app/assets/javascripts/application.js

//= require alertify

Optional js(coffe script) replace browser confirm dialog

//= require alertify/confirm-modal

In order to get the CSS, add the following line to app/assets/stylesheets/application.css

 *= require alertify
 *= require alertify/default
 *= require alertify/bootstrap

or if you using scss app/assets/stylesheets/application.scss

 @import "alertify";
 @import "alertify/default";
 @import "alertify/bootstrap";

flash helper, add the following line in layout

<%= alertify_flash %>

More option? read alertify.js documentation here