I'm pleased to announce the release of my first Ruby Gem: simple-tooltip
Simple Tooltip helps you make tooltip help available in your Rails 3 applications.
Simple Tooltip acts as a Rails Generator which will create a Tooltip model in your application along with a database table, a controller and views. You create help records using a web interface using plain text, html, Textile or Markdown formatting. The help records are stored in the database and retrieved using the unique, informative titles that you give them.
In your web pages you include a Tooltip helper that refers to the title of the relevant tooltip. Depending on how you set it up, when you hover over a tooltip icon or click on it, a popup window will appear displaying your help.
More than that, if the audience for your application is not just English-speaking, you can create multiple instances of each tooltip with content in each target language, identified by a two letter locale string. If a user has a non-English locale defined in your application, Simple Tooltip will look for content in the matching locale and display that. For content longer than single sentences, this is a more practical internationalization solution than I18n functionality built into Rails 3, which is more focused on shorter strings.
The gem is available at https://rubygems.org/gems/simple-tooltip.
The code is available at https://github.com/craic/simple_tooltip and is made freely available under the MIT license.
Archive of Tips
- ► 2013 (26)
- ► 2012 (28)
- ▼ March (6)
- ► 2010 (40)
- ► 2009 (53)
- ► 2008 (21)