New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

flashtastic

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flashtastic

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Flashtastic

Flashtastic is a Rails (3.1 and above) gem that replaces rails flash messages with Messenger (Version 1.3.6) javascript library for notifications.

Features

  • Adds Messenger js and css into your asset pipeline
  • Out of the box integration with rails flash messages
  • Works for ajax requests
  • Adds a default notification handler for ajax errors

About Messenger

  • Show transactional messages in your app.
  • Wrap AJAX requests with progress, success and error messages, and add retry to your failed requests.
  • Add actions (undo, cancel, etc.) to your messages.
  • 4kb minified and compressed.
  • Works in everything modern, and IE7 and above.

Demo and Usage of Messenger

Requirement/Dependency:

  1. jQuery

  2. Plays well with, but doesn't require, Bootstrap

Installation

Add this line to your application's Gemfile:

gem 'flashtastic'

And then execute:

$ bundle

Or install it yourself as:

$ gem install flashtastic

After gem installation do:

$ rails g flashtastic:install

Thats it!

Alternative Manual Installation

After installing the gem, if you don't want to run rails g flashtastic:install, do the following:

Copy the following coffeescript file in your assets:

flashtastic_initializer.js.coffee

Add the following directive to your application.coffee / application.js.

//= require messenger
//= require messenger-theme-flat
//= require flashtastic_initializer // This will add integration with rails flash messages.

Add the following directive to your application.scss / application.css. There are Five themes/styles provided (flat, future, air, block and ice), change required stylesheet as needed.

*= require messenger
*= require messenger-spinner
*= require messenger-theme-flat

Include Flashtastic module in Application controller

include Flashtastic

Thats it!

Usage

If you have included flashtastic_initializer.js.coffee in your assets, your regular rails flash messages will show up as messenger messages. Even for ajax requests.

Modify flashtastic_initializer.js.coffee as needed.

Demo and Usage of Messenger

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Author

Amit Gaur

FAQs

Package last updated on 21 Nov 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc