Plugins - Stickies

StarAdd to favorites

Stickies is a plugin for Ruby on Rails that provides some easy to use yet powerful features for displaying status messages. It’s a replacement for the traditional use of placing such messages in the flash.

Examples

The following line goes in your layout, where you normally render messages that are in the flash:

 <%= render_stickies %>

Once that is place, you can use the helper methods from your controllers or views for adding messages to the message collection:

 error_stickie("Your account has been disabled")
 warning_stickie("Your account will expire in 3 days")
 notice_stickie("Account activated")
 debug_stickie("This only works when RAILS_ENV is development")

Features

  • Displayed messages have a close link to remove them from the web page
  • Messages default to only being displayed once (they disappear on the next page load)
  • Messages can stick around until a user closes them
  • You can choose to have a specific message display every so often

To display a warning that a user’s browser sucks, no more than once every 24 hours:

 warning_stickie("Your browser sucks", {
   :remember => true,
   :name     => :browser_warning,
   :seen_in  => 24.hours,
 })

Peter Jones

http://software.pmade.com/stickies

http://pmade.com/svn/oss/stickies/trunk

Rails' (MIT)

  • Currently 5.0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

View Extensions

Tags

Comments

Add a comment
Max 25 May 2007

Wow, this looks like a really nice tool. I cannot say anythings about how useful it really is or how well it works, but I am pretty sure I will use it sooner than later.

Tom 24 May 2007

It would be nice if the home page had an example of what these "stickies" look like...then I could see why they are supposed to be so much better.

Search Plugins

Query syntax

Plugins by Category

Sponsors

Rails Kits: Get Code. Get Moving.

Have a comment?