Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A twitter like notification bar using jQuery for Ruby on Rails
Ruby JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
public
rails
tasks
test
MIT-LICENSE
README.markdown
Rakefile
install.rb
uninstall.rb

README.markdown

NotifyBar

NotifyBar uses Dmitri Smirnov's jQuery plugin to create Twitter like notifications for Rails. It uses flash messages. You can visit Dmitri's website to see demos of jQuery plugin.

Installation

script/plugin install git://github.com/emrekutlu/notify_bar.git

Usage

Add necessary javascript and css files to your layout.

<%= stylesheet_link_tag 'jquery.notifyBar' %>
<%= javascript_include_tag 'jquery.notifyBar' %>

Add notify_bar helper in body.

<%= notify_bar %>

By default notifyBar displays flash[:notice]. If you use a different key, you can specify it with :flash option.

<%= notify_bar :flash => :success %>

To use multiple keys :

<%= notify_bar :flash => [:notice, :success] %>

If multiple keys exist, notify_bar try to find in order they added. Just displays the first one found, not all of them.

NotifyBar tries to be compatible with jQuery-Notify-bar. It uses the same options except html and jqObject . It doesn't accept html because it uses flash messages to create it. It doesn't accept jqObject because I don't know what to do with it :)

An example with all options:

<%= notify_bar :flash => [:notice, :success], :delay => 2500, :animation_speed => 'slow', :close => true, :cls => 'notify' %>

Visit here to see the explanations of the options. One special note for cls , if cls is not assigned flash option is used for cls .

Copyright (c) 2010 İ. Emre Kutlu, released under the MIT license

Something went wrong with that request. Please try again.